+ Reply to Thread
Results 1 to 4 of 4

Excel drop down list validation

  1. #1
    Registered User
    Join Date
    04-07-2008
    Posts
    3

    Excel drop down list validation

    hi

    i was wondering if any could help me with a problem i am having with my excel spreadsheet.
    I have a order spreadsheet with two drop down lists. the first one is a list cell which has either yes or no for the question "do you want a gift?" and the other is a drop down list with the options of gifts.
    i need to validate these cells so that if they select yes they must choose a gift not leave it blank but if they select no then they can not choose a gift and if they do an error will appear.

    i can not work out how to do this.
    can any one help.
    thank you

    jessica

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    There's a lot of information you did not include. I will make assumptions;

    1. You're using the List feature of Data Validation to create your dropdown lists.
    2. Your gift list is from somewhere on your spreadsheet rather than typed into your data validation text box.

    Here's what I did to link "Yes" to the gifts and "No" to nothing;
    In B1, I typed into the validation list box, Yes, No
    In B2, I typed into the validation list box, =INDIRECT(B1)

    Then I highlighted your list of gifts and named that list "Yes" (type Yes, then enter into the name box where you'd normally see the cell ID in the upper left).

    This will not give an error if they don't choose a gift when they say "Yes" but won't allow a gift if they say "No." To do the first part, you'd need some Visual Basic programming.

    ChemistB
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-07-2008
    Posts
    3
    hi

    thanks you the help.

    i can give some information if you want.

    The two lists i have on the two cells are linked to two different lists on of sheets on the workbook. the yes/no list and the giftlist list. Yes i am using the data validation to link the lists
    I need validate the Yes/no list so that when they select No they can not select a gift option and when they select yes they have to select gift not leave it blank.

    thank you
    Jessica

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582
    Did you look at my attached file? I think it does what you want.

    ChemistB

+ 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