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?

Re: Data Validation by Earl

Earl
Tue May 06 10:54:11 CDT 2008

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 Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
"iamnu" <iamnubw@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?



Re: Data Validation by iamnu

iamnu
Tue May 06 11:13:18 CDT 2008

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...

Re: Data Validation by Rick

Rick
Tue May 06 11:58:48 CDT 2008

Try this Custom Validation formula...

=AND(LEN(A1)=4,ISNUMBER(A1))

Rick


"iamnu" <iamnubw@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...


Re: Data Validation by Dave

Dave
Tue May 06 12:15:31 CDT 2008

If the value is a number, then excel will see 0001 and 1 as equal.

But why impose the way the user enters the data?

Just use a custom numberformat of 0000
and use that data validation of between 1 and 9999.



iamnu wrote:
>
> 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...

--

Dave Peterson

Re: Data Validation by Dave

Dave
Tue May 06 12:16:35 CDT 2008

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.



"Rick Rothstein (MVP - VB)" wrote:
>
> Try this Custom Validation formula...
>
> =AND(LEN(A1)=4,ISNUMBER(A1))
>
> Rick
>
> "iamnu" <iamnubw@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...

--

Dave Peterson

Re: Data Validation by iamnu

iamnu
Tue May 06 12:21:23 CDT 2008

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?


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?
>


Re: Data Validation by Rick

Rick
Tue May 06 12:46:30 CDT 2008

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


"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:48209273.61A0F735@verizonXSPAM.net...
> 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.
>
>
>
> "Rick Rothstein (MVP - VB)" wrote:
>>
>> Try this Custom Validation formula...
>>
>> =AND(LEN(A1)=4,ISNUMBER(A1))
>>
>> Rick
>>
>> "iamnu" <iamnubw@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...
>
> --
>
> Dave Peterson


Re: Data Validation by iamnu

iamnu
Tue May 06 13:08:54 CDT 2008

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>
>
> The OP mentioned leading zeroes in his post, so what makes you think I would
> have tested for that particular condition.<bg>
>
> Rick
>
> "Dave Peterson" <peter...@verizonXSPAM.net> wrote in message
>
> news:48209273.61A0F735@verizonXSPAM.net...
>
> > 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.
>
> > "Rick Rothstein (MVP - VB)" 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...
>
> > --
>
> > Dave Peterson

The new formula didn't work either, but I am not considering using
Dave's suggestion. Thanks all for the help.

Re: Data Validation by Rick

Rick
Tue May 06 13:55:56 CDT 2008

> 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