+ Reply to Thread
Results 1 to 4 of 4

Need Data Validation formula for 16 digit numbering with '-'

  1. #1
    Registered User
    Join Date
    12-07-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    20

    Need Data Validation formula for 16 digit numbering with '-'

    I have been trying to figure out the data validation formula to require users to input this specific varchar numbering 1234-123-1234567

    Can someone please provide me with some help?

    MS Excel 2012 and later

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Need Data Validation formula for 16 digit numbering with '-'

    This works for me, where E7 is the cell containing the data validation:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-07-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Need Data Validation formula for 16 digit numbering with '-'

    Thanks however, one issue when I try to apply it to multiple cells in a col like this

    =AND(LEN(F27:F37)=16,ISNUMBER(VALUE(MID(F27:F37,1,4))),MID(F27:F37,5,1)="-",ISNUMBER(VALUE(MID(F27:F37,6,3))),MID(F27:F37,9,1)="-",ISNUMBER(VALUE(MID(F27:F37,10,7))))

    It doesn't seem to work.

    It throws the Value no valid error.

    Thoughts?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Need Data Validation formula for 16 digit numbering with '-'

    You can't use ranges like that. The formula has to refer to the cell containing the data. Set up your data validation in F27, then copy the cell to F28:F37 and the data validation formula will be taken along with it. (I don't remember if there is a "paste special -> validation" option in 2003. You have a pretty old version of Excel.)

+ 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: 3
    Last Post: 12-24-2014, 04:52 PM
  2. [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
  3. Update data validation numbering when a number is selected
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2013, 10:53 PM
  4. [SOLVED] Data Validation into 10 or 7 digit number
    By freeSky in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-21-2012, 09:24 AM
  5. Replies: 3
    Last Post: 06-16-2011, 10:37 PM
  6. Replies: 7
    Last Post: 05-06-2009, 07:29 PM
  7. Data Validation for 5 digit alpha entry only
    By wotadude in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2008, 03:34 PM

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