+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Data Validation Question

  1. #1
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79

    Unhappy Data Validation Question

    I have used Excel 2007's Data Validation function to tell it what it will allow in a cell, but I want it to disallow some numbers, is this possible?
    I don't want users to be able to input 1, 2, 3, 5, 10 and 20 into cell A1.

    Please help!

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Usually in Data validation you can set a max and min for a range of numbers. I haven't got 2007 today, but I can't recall it being part of the changes.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79
    Yeah it does but 1,2,3,5,10 and 20 are the only ones I want it to exclude. I want to be able to put 4 or 6.5 for example and if I exclude between 1 and 20, it won't allow me.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    Data validation > List > 1,2,3,5,10,20


    You can hide the dropdown arrow if you want.
    Make sure the Error warning is ticked.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79
    yeah but I DON'T want it to allow those numbers. Anything but 1,2,3,5,10 and 20

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    My bad I mis read your post.

    Create a Name, BAD_NUMBERS, with this reference.

    ={1,2,3,5,10,20}

    Then for the data validation use Custom with the following formula. Where $D$5 is the input cell.

    =ISNA(HLOOKUP($D$5,BAD_NUMBERS,1, FALSE))

    uncheck Ignore blanks and add Error message.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-24-2007
    Location
    Melbourne, Australia
    Posts
    79
    Thanks Andy. It worked perfectly!
    Jase

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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