Validation rule - custom 5 digits w/ leading zeroes

J

jennifer

I am having trouble creating a validation rule for cells. I would like only
6 digit numbers to be entered. However, when using CUSTOM (000000) I can't
seem to get it to work. Any thoughts?

012345
234567

It works for 234567 but not for 012345
 
N

N Harkawat

First change the cell to format-->Text
Then under data--> Validation
select custome from drop down choices and enter
=len(trim(a1))=6

Now cell A1 will only accept texts = 6 characters If you need space as a
character then remove "trim" from the formula
 
Top