Data Validation on multiple columns

  • Thread starter Thread starter NDBC
  • Start date Start date
N

NDBC

I have id tag numbers in two columns (columns F and G) and I need to check
that each id tag number is only used once. (eg. if an id number is used in
column F I need to check that it is not used again in either column F or
column G).

Can I use >Data>Validation. Custom with some variation of the countif
formula.

Thanks
 
Can I use >Data>Validation. Custom with
some variation of the countif formula.

Yes.

Assume the range of interest is F1:G10
Select the range F1:G10 starting from cell F1. Cell F1 will be the active
cell.
Use a formula like this:

=COUNTIF($F$1:$G$10,F1)<2
 
Thanks Biff. I didn't realise it needed the range to be in $ for it to work.

Is it possible to select the entire columns. I know when it is only one
column you can use F:F but is there a similar code to do all of column F and G
 
Back
Top