+ Reply to Thread
Results 1 to 5 of 5

How to control user input on a multiple drop down lists?

  1. #1
    Registered User
    Join Date
    10-29-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    How to control user input on a multiple drop down lists?

    Hi All,

    Your help is much appreciated

    Intro:
    ========
    I am new this forum and to Excel. I do not understand VB and Macros, I am trying to only use
    formulas and functions, if you can help, please make it simple, so I can understand it and use
    it to do other things later on, or you risk me writing again and again to the forum :-)

    Problem:
    =========
    I to create a Drop Down List Items, based on an entry made on a previous drop down list, and this
    will be done over and over many lists, NOT ONLY TWO, like most examples on the web

    on the attached Excel:
    ====================
    Tab = Logic Flow: I mapped the possible scenarios, I added an IF statement as well in the RED and GREEN Cells
    Tab = GP Tool: This is the actual tool I wrote, very basic I know

    Questions (All related to Tab = GP Tool) :
    ==================================
    Q # 1:
    Once the user selects a value in “C3”, I want specific values to show up
    in “C5, C7,C9,C11” based on the logic on tab = Logic Flow
    The way it is right now, all options are available for the user to pick from
    the cells which are not going to have a value, because of the value
    selected in C3, would show “N/A”

    Q# 2:
    If C3=ATB, I want all other cells to show “N/A”, and C16=”N/A”

    Q#3:
    Is it possible to do it where once C3 is selected, everything else goes blank
    till the user makes an actual selection? the way it is right now, if C3 has a new
    value, the other cells keep their old value, including C16, which can cause
    confusion and lead the user to believe he/she already got the answer


    Thanks in advance for your help

    BR,

    Rashed
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-29-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to control user input on a multiple drop down lists?

    looking at the number of views and (0) response makes me think maybe I did not do a good job describing what I am trying to do, here is a second attempt:
    Q1. If user select a value in "C3" then only certain values would show up in C5
    Based onthe value of C5, only certain values will show up in C7
    Based on the value of C7, only certain values will show up in C11
    I tried creating name range and use the indirect command, this did not work beyon C7!

    Q3:Is it possible to do it where once C3 is selected, everything else goes blank or the other cells (i.e. C5, C7, C11) will turn red to alert the user that he/she needs to input some values before getting the final recommendation

    Thanks again for any help/advice you can offer

    BR,
    Rashed

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: How to control user input on a multiple drop down lists?

    You are talking about dependant data validation here, and it requires that you create a series of named ranges, with each name matching an item from the previous selection.

    So if your 1st selection has 3 choices, you need to create a list for each of those choices (3 lists), with each list containing the items available for each choice.

    Lets assume that choice 1 has 4 options to choose from, with each of those having 2 more choices (we can continue this for a lot more, but lets stick with 3 levels for now)

    for each of those 4 options, you need a range name (and range) that matches each choice, and each range will contain 2 items

    Following so far? Good

    Sooooo, we start off with 3 choices
    Mammal
    Bird
    Fish
    so we have a range name for each of those
    If Mammal is selected, we get 4 choices...
    feline
    bovine
    marsupial
    ape
    again, we have a named range for each of them (and each has 2 choices)

    If we select Feline we get 2 choices
    Lion
    Tiger

    we now have a DV with 4 options - each option becomes an named range, with a range of data
    Mammal (named range with a list of all 4 mammal types)
    - feline (named range with a list of cats)
    ---lion (1 of the items inside the "feline" range

    As you can see from the above, with each level added, the quantity of ranges/range names increases exponentially

    Hope that helped and didnt confuse you even more?

    Take a look at the (2-level) sample attached. Each "next" level is referenced using the INDIRECT() function
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    10-29-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How to control user input on a multiple drop down lists?

    Thank You FDibbins, the solution you provided is great, but I guess it works only if we check one cell at a time, in my case, I have check multiple cells, since I can not upload documents right now, I will use text only:
    Using the example you provided:
    B4 = Mammal
    C4 =INDIRECT(B4)
    D5 =I want to check both B4 & C4 before I decide on which name list I want to use, so if D4 was the number of wings, this field will show N/A,
    but if B4=Bird AND C4= bird1, then D4=2
    if B4=Bird AND C4= bird2, then D4=4
    if B4=Bird AND C4= bird3, then D4=N/A
    I found on the internet an example as following: =INDIRECT(SUBSTITUTE(C3&C5," ",""))
    I was hoping to use it to look at two cells, and remove the spaces at the same time, but that did nt work!!! I also thought
    I can use the same syntax to verify the value of 3 or more cells before make a decision on what name range list to use

    Again, your help is much appreciated

    Rashed

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: How to control user input on a multiple drop down lists?

    THis is 1 of those situations that you can either have a formula (to give you the N/A) OR or can have the Dv return, you cannot have both As soon as you select an entry from the DV, it will replace whatever the contents were.

    Perhaps, you could use another cell to give you the N/A, based on what the contents of the DV cells are?
    =if(B4<>"Bird","N/A","whatever-other-text-you-want")

+ 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] drop down lists using a variable input
    By Allsort in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-12-2013, 10:02 AM
  2. Save user input in a userfrom control
    By ccpsc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2012, 07:22 PM
  3. [SOLVED] How to create different drop down lists depending on user's response?
    By WillGe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2012, 08:26 AM
  4. Multiple linked drop down lists (Master drop down)
    By zaalibhai in forum Excel General
    Replies: 1
    Last Post: 06-23-2011, 10:51 AM
  5. Pause macro for user input then search for user's answer across multiple sheets
    By sassy2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-04-2009, 03:55 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