3 data validations

G

Guest

Hi
I have data in column A, B and C (these are account numbers). I need to
prevent
a) duplicate entries - which is working fine with "COUNTIF($A:$C,A2)<2"
formula in custom data validation

I also need to add two more validations
b) only numbers are allowed (no letters or characters)
c) the lenght must be 8

Can some one help me with a formula for all 3 of them or is there a better
way of doing this in VBA (instead of data validation)

Thanks
 
B

Bob Phillips

=AND(COUNTIF:)A:$C,A2)<2,ISNUMBER(A2),LEN(A2)=8)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

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