Data Validation on multiple columns

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
 
T

T. Valko

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
 
N

NDBC

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top