ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Validation rule - custom 5 digits w/ leading zeroes (https://www.excelbanter.com/excel-worksheet-functions/79702-validation-rule-custom-5-digits-w-leading-zeroes.html)

jennifer

Validation rule - custom 5 digits w/ leading zeroes
 
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 Harkawat

Validation rule - custom 5 digits w/ leading zeroes
 
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


"jennifer" wrote in message
...
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





All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com