# Data Validation - Allow 8 numeric digits-consider also zero as a digit if it's first digit

1. ## Data Validation - Allow 8 numeric digits-consider also zero as a digit if it's first digit

Thank you for helping me
I need to add following data validation to excel cell
Allow user to input 8 numeric digits for eg. 12345678
Cell A1
=AND(ISNUMBER(A1),LEN(A1)=8)

My issue is with a number starting with "zero" for eg. 00012345
In this case when i enter a number starting with 00012345 excel doesn't consider zero as a number and also replaces it like 12345

How can i add a data validation of numeric 8 digits for a number that is starting with 0?

FYI - I have tried changing the number format it didn't work

2. ## Re: Data Validation - Allow 8 numeric digits-consider also zero as a digit if it's first d

Hi,

If you format A1 as text, and then use this formula to validate, it should work.

Formula:
`Please Login or Register  to view this content.`

3. ## Re: Data Validation - Allow 8 numeric digits-consider also zero as a digit if it's first d

Thanks it worked

4. ## Re: Data Validation - Allow 8 numeric digits-consider also zero as a digit if it's first d

If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

5. ## Re: Data Validation - Allow 8 numeric digits-consider also zero as a digit if it's first d

how can i add a validation to check if the first three digits is zero or not??, thanks

6. ## Re: Data Validation - Allow 8 numeric digits-consider also zero as a digit if it's first d

Hi,

Formula:
`Please Login or Register  to view this content.`

This will return TRUE if the first three characters are zeroes and false if not.

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1