View Single Post
  #14   Report Post  
archeti
 
Posts: n/a
Default simple validation formula required

It's interesting to note the way my question evolved!!!

....and Ron, never mind your formula not being pretty!
thanks to all for your valuable input.

cheers

"Ron Coderre" wrote:

This isn't particularly pretty, but I think this validation formula works
(for a value in cell A1):

=AND(LEN(A1)=5,ISNUMBER((-MID(A1,1,1))*(-MID(A1,2,1))*(-MID(A1,2,1))*(-MID(A1,3,1))*(-MID(A1,4,1))*(-MID(A1,5,1))))

It checks that the length is 5 characters and that each character is a number.
It allows leading zeros and all zeros (00000).

Does that help?
--
Regards,
Ron


"archeti" wrote:

can anyone pls help me with a simple validation formula I require.

I need to restrict entry into a cell for just 5 numerical digits (no
alphabetic characters)

i use the LEN function to make sure that the number of digits is exactly
equal to five, but don't know which function to use to restrict alphabetic
and other characters.

please help
thanks