Forum Discussion

bpinter's avatar
bpinter
Copper Contributor
Jul 26, 2021
Solved

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?

5 Replies

  • mtarler's avatar
    mtarler
    Silver 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)

     

Resources