+ Reply to Thread
Results 1 to 5 of 5

Dynamic Ranges as drop down lists based on another drop down list

  1. #1
    Registered User
    Join Date
    05-15-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007-2010
    Posts
    4

    Dynamic Ranges as drop down lists based on another drop down list

    Hello,
    I have looked and tried different things to create what I need but have been unsuccessful (Due to my lack of knowledge in excel).
    I need to create a workbook for users with even less excel knowledge than me (Now I am in trouble! ) They will be running excel 2007 or older.

    Here's the idea.
    I have a workbook with two sheets. Data and Listas. (This is for a spanish speaking audience)
    The Listas sheet contains three lists. Column B list options will NOT change or have any more options added. List Name = Ingreso_Egreso. List Options: Ingreso, Egreso. This one I am good with.

    This is where my problem begins:
    The other two lists, Column D and Column F Will have items added, removed and modified. Therefore I need to have these lists be dynamic. By searching I have made the following list formulas:
    =OFFSET(Listas!$D$2,0,0,COUNTA(Listas!$D:$D)-1)
    =OFFSET(Listas!$F$2,0,0,COUNTA(Listas!$F:$F)-1)
    for both. I don't really understand it but I think it creates a list based on only the cells that have values from D2 or F2 to the last value. Column D list is named "Ingreso" and Column F list is named "Egreso" (Which matches the options from the previous list)
    OK, Now I need the options on the data sheet to be based on the lists.
    On the data sheet, for column D I have data validation to allow a list and on the source I have =Ingreso_Egreso to allow only items from the "Ingreso_Egreso" List, so only possible values are: Ingreso or Egreso (This matches the names of my other two dynamic lists) and works...
    However, on column F is where I need to see the options based on the input of column D so if column D = Ingreso, then give me the drop down options from the ingreso list and vice-versa. The formula I have on Column F is: Data Validation, Allow List and on source I have =INDIRECT(D2) and I get an error....
    "Source evaluates to error" If I click Yes to continue I get no drop down options..
    File is attached...

    Can someone please help me!

    Any advice and help is greatly appreciated..
    Thanks...
    Attached Files Attached Files

  2. #2
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Dynamic Ranges as drop down lists based on another drop down list

    Unfortunately, you're wasting your time on this (as I wasted days and days trying to find a solution). In a nutshell, you can only INDIRECTly refer to a named range that is static, not dynamic. Period.

    To keep your workbook user-editable, you could add some VBA to your lists sheet that actually redefines your named ranges for you anytime someone adds to those columns, but then your workbook would have to be a .xlsm file.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: Dynamic Ranges as drop down lists based on another drop down list

    I used the concept shown here:

    http://www.contextures.com/xldataval02.html#Dynamic

    See attached.
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Administrator JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Dynamic Ranges as drop down lists based on another drop down list

    Quote Originally Posted by NBVC View Post
    I used the concept shown here:

    http://www.contextures.com/xldataval02.html#Dynamic

    See attached.

    So, the "dynamic" part of the range creation is moved into the Data Validation itself, thus eliminating the issue. Nice workaround.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    05-15-2012
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007-2010
    Posts
    4

    Re: Dynamic Ranges as drop down lists based on another drop down list

    Thanks for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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