Data Validation - Do not allow the letter "O"

J

jhicsupt

Is there a way in data validation not to allow the letter "O" to be
contained? Also I need it to be no more than 5 characters and/or numbers.

This is an employee number that is 5 characters, but never contains the
letter "O". I do not want the user to mistakedly type in "O". I need it to
prompt that they must use the number "0".

Thanks in advance.
 
R

Ragdyer

Try this:

Custom, and enter this formula:

=AND(LEN(A1)=5,ISERR(SEARCH("o",A1)))
 
P

Peo Sjoblom

One way, assume number is in B1, in validation use custom and

=AND(LEN(B1)>5,ISERR(SEARCH("o",B1)))


--
Regards,

Peo Sjoblom

(No private emails please)
 
J

jhicsupt

Thanks - it worked perfectly!

Peo Sjoblom said:
One way, assume number is in B1, in validation use custom and

=AND(LEN(B1)>5,ISERR(SEARCH("o",B1)))


--
Regards,

Peo Sjoblom

(No private emails please)
 
Top