Re: Data Validation by Rick
Rick
Tue May 06 12:41:05 CDT 2008
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
"iamnu" <iamnubw@gmail.com> wrote in message
news:15e9ba5d-8016-4ca7-a112-2a07aec596b1@a23g2000hsc.googlegroups.com...
> On May 6, 10:58 am, "Rick Rothstein \(MVP - VB\)"
> <rick.newsNO.S...@NO.SPAMverizon.net> wrote:
>> Try this Custom Validation formula...
>>
>> =AND(LEN(A1)=4,ISNUMBER(A1))
>>
>> Rick
>>
>> "iamnu" <iamn...@gmail.com> wrote in message
>>
>> news:1f986b4c-5461-465b-802a-733f10b11d70@d77g2000hsb.googlegroups.com...
>>
>> > On May 6, 9:54 am, "Earl Kiosterud" <some...@nowhere.com> wrote:
>> >> You don't say if 0001 and 1 are to be considered equivalent, so I'll
>> >> give
>> >> this a shot.
>> >> Data - Validation - Whole number - Between 0 and 9999.
>> >> --
>> >> Regards from Virginia Beach,
>>
>> >> Earl Kiosterudwww.smokeylake.com
>> >> -----------------------------------------------------------------------"iamnu"
>> >> <iamn...@gmail.com> wrote in message
>>
>> >>news:376d1bd4-49d7-4ac6-8ed6-a464c6d24dd8@m44g2000hsc.googlegroups.com...
>>
>> >> >I want to use data validation on a cell where the user MUST enter any
>> >> > four digits, leading zeros are permitted.
>>
>> >> > Can someone explain how I do this?
>>
>> > "The user MUST enter 4 digits." That means that 0001 and 1 are NOT
>> > 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?
>