ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Data Validation on multiple columns (https://www.excelbanter.com/excel-discussion-misc-queries/240076-data-validation-multiple-columns.html)

NDBC

Data Validation on multiple columns
 
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 DataValidation. Custom with some variation of the countif
formula.

Thanks


T. Valko

Data Validation on multiple columns
 
Can I use DataValidation. 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


--
Biff
Microsoft Excel MVP


"NDBC" wrote in message
...
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 DataValidation. Custom with some variation of the countif
formula.

Thanks




NDBC

Data Validation on multiple columns
 
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

"T. Valko" wrote:

Can I use DataValidation. 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


--
Biff
Microsoft Excel MVP


"NDBC" wrote in message
...
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 DataValidation. Custom with some variation of the countif
formula.

Thanks





T. Valko

Data Validation on multiple columns
 
Try this:

=COUNTIF($F:$G,F1)<2

I don't know how efficient that'll be!

--
Biff
Microsoft Excel MVP


"NDBC" wrote in message
...
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

"T. Valko" wrote:

Can I use DataValidation. 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


--
Biff
Microsoft Excel MVP


"NDBC" wrote in message
...
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 DataValidation. Custom with some variation of the countif
formula.

Thanks








All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com