+ Reply to Thread
Results 1 to 5 of 5

Data Validation - Want to Accept Numbers in Multiple Formats

  1. #1
    Registered User
    Join Date
    10-29-2014
    Location
    Cube Land
    MS-Off Ver
    7
    Posts
    5

    Data Validation - Want to Accept Numbers in Multiple Formats

    Is there a way to set up a cell with a data validation list that does not discriminate based on format? So if the number 42 was in the validation list, the cell would accept either the number 42 or the character 42?

    I'm setting up a data entry worksheet, and one of my fields is a unique identifier number. The number is usually input as a text field to maintain ocasional leading zeroes.

    The issue is, I want the users to be able to either paste in the ID from another source (most likely formatted as text), type the number into the cell (which defaults to a number format), or pick the correct ID from a dropdown. And I don't want to accept any other value in that field.

    I know that I could just double the size of the data validation list to include the full set as numbers and the full set as characters, but then the dropdown list would be cluttered with all those duplicates. I'm hoping there's a better way...

    Thanks in advance for any help!

  2. #2
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Data Validation - Want to Accept Numbers in Multiple Formats

    Try adding VALUE(cell) instead of just cell reference. Excel will then use the numeric form of a text-formatted number.

    Hope that helps.

    -Z

  3. #3
    Registered User
    Join Date
    10-29-2014
    Location
    Cube Land
    MS-Off Ver
    7
    Posts
    5

    Re: Data Validation - Want to Accept Numbers in Multiple Formats

    Thought that did it. It's definitely better than what I had before. Thanks for your quick help.

    Only issue I have now is that if I use the value() function I seem to lose any leading zeroes. Any ideas on avoiding that?
    Last edited by SteveMcHugh; 11-07-2014 at 12:53 PM.

  4. #4
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Data Validation - Want to Accept Numbers in Multiple Formats

    Always happy to help. 8 )

    -Z

  5. #5
    Registered User
    Join Date
    10-29-2014
    Location
    Cube Land
    MS-Off Ver
    7
    Posts
    5

    Re: Data Validation - Want to Accept Numbers in Multiple Formats

    I believe I've found my solution.

    If I leave my data validation list in text format, and then change the format of the cells where the data will be entered to "zip codes" (format cells -> special -> zip codes) that seems to do the trick. Now when a user enters a number manually, it stays in zip (which is text) format instead of automatically converting to number format which the data validation doesn't recognize.

+ 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. [SOLVED] Data validation - accept "-" and numbers as input
    By 2001jesper in forum Excel General
    Replies: 5
    Last Post: 11-05-2013, 07:30 AM
  2. [SOLVED] Data Validation to accept values not on the list
    By JO505 in forum Excel General
    Replies: 2
    Last Post: 02-26-2013, 02:44 PM
  3. Data Validation to accept only Date Type
    By pblnrao in forum Excel General
    Replies: 1
    Last Post: 06-13-2011, 09:00 AM
  4. Data Validation - Accept Only Certain Numbers/Characters
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2006, 07:35 PM
  5. Data Validation to only accept Y and N and NO blank
    By Joe HM in forum Excel General
    Replies: 3
    Last Post: 03-10-2005, 09:06 AM

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