Data Validation formula

D

DustinS

Using data validation, I would like to have the user be able to select (or
enter) either "XXXX" or enter a four digit number. How can I do this?
 
C

Chip Pearson

Dustin,

In the Allow box, choose Custom, and use the following formula.

=OR(A1="XXXX",AND(ISNUMBER(A1),LEN(A1)=4))

Change A1 to the appropriate cell reference.
 
D

DustinS

Chip,
When you have a moment would you be willing to explain why that formula
works the way it does?
 

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