+ Reply to Thread
Results 1 to 6 of 6

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

  1. #1
    Registered User
    Join Date
    03-20-2021
    Location
    Montreal
    MS-Off Ver
    2008
    Posts
    11

    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. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,440

    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: copy to clipboard
    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    03-20-2021
    Location
    Montreal
    MS-Off Ver
    2008
    Posts
    11

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

    Thanks it worked

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,369

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


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    03-20-2021
    Location
    Montreal
    MS-Off Ver
    2008
    Posts
    11

    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. #6
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,440

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

    Hi,

    Formula: copy to clipboard
    Please Login or Register  to view this content.


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

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 06-04-2015, 03:25 PM
  2. Replies: 3
    Last Post: 12-24-2014, 04:52 PM
  3. [SOLVED] Data Validation to only allow a 12 digit HEX value
    By n3mcx1 in forum Excel General
    Replies: 6
    Last Post: 10-30-2014, 03:31 PM
  4. [SOLVED] LOTTERY FILTER#4, Find if 1 Digit Sum of 2 Digit or 3 Digit, Single Cell w/ dash
    By david gonzalez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 12:57 AM
  5. Replies: 7
    Last Post: 05-06-2009, 07:29 PM
  6. Replies: 3
    Last Post: 04-23-2009, 01:11 AM
  7. Replies: 3
    Last Post: 09-24-2007, 03:14 PM

Tags for this Thread

Bookmarks

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