Try this Custom Validation formula...
=AND(LEN(A1)=4,ISNUMBER(A1))
Rick
That didn't work for me.
Excel stripped off the leading 0's before applying the validation rules. And so
the =len(a1) portion failed.
> Try this Custom Validation formula...
>
[quoted text clipped - 22 lines]
> > equivalent.
> > Thanks for trying to help, though. I appreciate any suggestions...

Signature
Dave Peterson
Rick Rothstein (MVP - VB) - 06 May 2008 18:46 GMT
Yeah, it doesn't work for me either.<g>
The OP mentioned leading zeroes in his post, so what makes you think I would
have tested for that particular condition.<bg>
Rick
> That didn't work for me.
>
[quoted text clipped - 29 lines]
>> > equivalent.
>> > Thanks for trying to help, though. I appreciate any suggestions...
iamnu - 06 May 2008 19:08 GMT
On May 6, 11:46 am, "Rick Rothstein \(MVP - VB\)"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> Yeah, it doesn't work for me either.<g>
>
[quoted text clipped - 40 lines]
>
> > Dave Peterson
The new formula didn't work either, but I am not considering using
Dave's suggestion. Thanks all for the help.
Rick Rothstein (MVP - VB) - 06 May 2008 19:55 GMT
> The new formula didn't work either,
Did you remember to Format the cells as Text?
> but I am not considering using
> Dave's suggestion. Thanks all for the help.
Did you mean to include the word "not" in your statement? The way the last
sentence is worded, it sounds like you do not need any further help, but the
statements that precede the last sentence makes it sound like you still do.
Rick
On May 6, 10:58 am, "Rick Rothstein \(MVP - VB\)"
<rick.newsNO.S...@NO.SPAMverizon.net> wrote:
> Try this Custom Validation formula...
>
[quoted text clipped - 22 lines]
> > equivalent.
> > Thanks for trying to help, though. I appreciate any suggestions...
Thanks Rick, but that doesn't work either. Your formula accepts any 4
digit number UNLESS it begins with a zero.
I want to be able to enter 0123, for example. Do you have another
suggestion?
Rick Rothstein (MVP - VB) - 06 May 2008 18:41 GMT
Try this instead... Format the cells as Text and then use this Validation
formula...
=AND(ISNUMBER(VALUE(C1)),LEN(C1)=4)
Have you given Dave's idea any consideration? I think that sounds like a
better idea to me than forcing the user to type leading zeroes.
Rick
> On May 6, 10:58 am, "Rick Rothstein \(MVP - VB\)"
> <rick.newsNO.S...@NO.SPAMverizon.net> wrote:
[quoted text clipped - 30 lines]
> I want to be able to enter 0123, for example. Do you have another
> suggestion?