Data validation don't work

M

Mary

Hi,
I am trying to set up column D as unique but everytime that I type the below
formula doesn't work. If I enter the same value twice it takes.
=COUNTIF(D:D,D1)<2
 
J

John Bundy

Sorry didn't get a good look at that, all you are doing with your formula is
counting how many times the value in D1 appears in column D, and then asking
if it is less than 2. What are you doing next? What are you trying to get in
the end?
 
G

Gord Dibben

Maybe your numbers are text?

Format all to General.

Copy a blank cell.

Select your data range and Edit>Paste Special(in place)>Add>OK>Esc.

Does the CF work now?


Gord Dibben MS Excel MVP
 
M

Mary

No, it does not work and I don't know what is wrong. I set CF and it allows
me to type the same value 3 times and the fourth time I got the restricted
message.
 
G

Gord Dibben

Sorry

I used the term CF not DV which is what you are trying to use.

Did you see the couple other replies you got?

Toppers stated that your formula worked for him.

Works for me.

I select all of column D and Data>Validation>Allow>Custom

=COUNTIF(D:D,D1)<2 and OK out.

Type qwerty in D1

Type qwerty in D2 and get the "restricted" message.


Gord
 
Top