+ Reply to Thread
Results 1 to 6 of 6

Data Validation: Need to restrict drop-down selection

  1. #1
    Registered User
    Join Date
    12-16-2008
    Location
    Minneapolis
    Posts
    16

    Data Validation: Need to restrict drop-down selection

    Geniuses, I have one more problem, and then my project will be complete:

    Basically, I have two fields that do the same thing [preset selection vs custom entry], and I need to restrict one from holding any data if the other already does. One field is a drop-down menu, and the other is a decimal entry. It was easy to restrict the decimal from being entered if a drop-down selection has already been made - Data Validation prevents any entry unless the drop-down cell is blank. It's not so easy to restrict the drop-down, however, as it already uses List-type Data Validation to allow only values from a specified range.

    Does anyone have any ideas for allowing the drop-down to function as normal if a specific other field or range is blank, but not allowing a selection to be made if that specific field or range already has data in it?

    I've attached a simplified example worksheet.

    Thanks in advance,
    joe in MPLS
    Attached Files Attached Files
    Last edited by splenguin; 09-08-2009 at 03:46 PM.

  2. #2
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Valrico, FL USA
    MS-Off Ver
    Excel 2016
    Posts
    358

    Re: Data Validation: Need to restrict drop-down selection

    Try out the attached and see is this does what you want.
    Attached Files Attached Files

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Data Validation: Need to restrict drop-down selection

    Use this formula for Data Validation, Custom option for cell B2.

    =AND(LEN(A2)=0,ISNUMBER(B2))

    Continue to use the list option in cell A2, using AnimalList.

    This will prevent an entry in B2 if a selection was made in A2

  4. #4
    Registered User
    Join Date
    12-16-2008
    Location
    Minneapolis
    Posts
    16

    Re: Data Validation: Need to restrict drop-down selection

    ncmay, I see where you're going; I didn't realize a formula could be used in Data Validation even if List is selected. However, it doesn't appear to be working; I can still select an item from the list even if a decimal has been entered in B2. Curious what the "Num" in your formula means? Couldn't find it in Help..

  5. #5
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Valrico, FL USA
    MS-Off Ver
    Excel 2016
    Posts
    358

    Re: Data Validation: Need to restrict drop-down selection

    Try changing the formula in the data validation from:
    =IF(ISNUMBER(A2,Num,AnimalList)

    To:
    =IF(ISNUMBER(B2,Num,AnimalList)

    Or you can delete the Num named range and reference any vacant cell:
    =IF(ISNUMBER(B2,G1,AnimalList)

    Num is just another named range that references the empty cell G1.

    Hope this helps

  6. #6
    Registered User
    Join Date
    12-16-2008
    Location
    Minneapolis
    Posts
    16

    Re: Data Validation: Need to restrict drop-down selection

    Wonderful! It works great, thanks you o so very much.

+ 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