Forum Discussion
Need Help, Validate a cell vs a table
Hi,
I will start out by saying… I’m using a live document, so I can’t use Macro/VBA.
I want to use data validation to check another cells text against a table on another sheet. If the text matches against text in the table, it should not allow data to be entered into the cell. The issues that Im having is the cells I’m comparing against are in a table themselves, so they need to be able to check against the text on the appropriate row.
Is this possible to do?
bpinter I think this is what you want:
=COUNTIF(Sheet2!$A$2:$A$3,$B2)where Sheet2!$A$2:$A$3 is the range of the acceptable values and $B2 is the top row of the Task column.
5 Replies
- mtarlerSilver Contributor
bpinter A sample would help and more details on what is allowed or not allowed would help. You say it can't be in the table but then later you say it has to check that row...
Let's say you don't want any duplicate entries on any given row and the data is in the range B2:E7. Then select that range and in Data Validation select 'custom' and enter this formula:
=(COUNTIF($B2:$E2,B2)=1)If instead you want unique values entered in the entire table then use:
=(COUNTIF($B$2:$E$7,B2)=1)