+ Reply to Thread
Results 1 to 7 of 7

the Holy Grail of dropdowns: 4D

  1. #1
    Registered User
    Join Date
    03-13-2019
    Location
    USA
    MS-Off Ver
    O365
    Posts
    3

    the Holy Grail of dropdowns: 4D

    Basically, I need to create a drop down list dependent on another drop down selection, but both drop down sources are in the same table that is NOT sorted and is dynamic (users continue to enter new stuff). ie "D4: Dynamic Dependent Drop Downs"

    I can't post images yet, so picture a 2 column table of states and cities. Users enter new rows as needed, no sorting. Elsewhere, a drop down allows the user to select a state. The next drop down (the problem) should populate with cities matching that state selection.

    I've included a link to an xls with that starting point:
    https//drive.google.com/file/d/11RDfeNaQgruEbeIKuhtdEcSabzR7lqUq/view?usp=sharing

    The approaches at contextures won't work on unsorted lists, and transposing all data from columns to rows like at Xelplus.com seems way too hacky and will confuse future workbook users/owners and/or won't be maintainable.

    I've scratched and googled my way through every approach I can find/contrive and am on the cusp of heading to VBA... before I do though I wanted to see if anyone out there had done this and could share?

  2. #2
    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,939

    Re: the Holy Grail of dropdowns: 4D

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  3. #3
    Registered User
    Join Date
    03-13-2019
    Location
    USA
    MS-Off Ver
    O365
    Posts
    3

    Re: the Holy Grail of dropdowns: 4D

    Thank you FDibbins, but as I just registered here (after years of lurking!) I am not allowed to attach pics or workbooks yet. The instructions said after 'a few posts' I would, but in the meantime I included a link to the exact workbook you recommend (on my google Drive).

    Thanks!

  4. #4
    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,939

    Re: the Holy Grail of dropdowns: 4D

    No, you cannot (yet) attach a pic or a link (which we dont really want anyway, but yes, you can attach a sample workbook, as per my directions.

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: the Holy Grail of dropdowns: 4D

    See attached sheet for an example. The User would not need to do any maintenance.


    In Sheet2, I have a list of states in col A
    Col B uses an Arrayed formula (entered with CNTRL SHIFT ENTER) in B2 copied down
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the Name Manager for defined names "States" and "cities"
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    03-13-2019
    Location
    USA
    MS-Off Ver
    O365
    Posts
    3

    Re: the Holy Grail of dropdowns: 4D

    Yikes, you nailed that FAST... thank you and my hat's off to you! Took me a little time to figure out how you accomplished it and bring in all the table and named ranges I wanted to use, but got there and it is working, thank you!

    Only question, is there any way to refer to a table[column] in the formula used to make the column of cities? Specifically the ROWS($B$7$B7) in this
    {=IFERROR(INDEX(tblCityStates[city], SMALL(IF(tblCityStates[state]=chooseState, ROW(tblCityStates[state])-6),ROWS($B$7:$B7))),"")}

    (I'm asking to make this formula easier to copy/paste int he future - just rely on tables & named ranges)
    Last edited by davedigerati; 03-15-2019 at 06:26 PM.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: the Holy Grail of dropdowns: 4D

    Sorry Dave, not sure what you are asking for. The column of cities in my workbook automatically narrows to the cities within a specific state as soon as a state is chosen by the user. Do you have multiple columns of cities? How is your table set up?

+ 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] VBA for dropdowns based on another dropdowns
    By abhi_jain80 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2016, 05:14 AM
  2. How to count the Holy-days between 2 dates,
    By mohammadamjad48 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2015, 03:38 AM
  3. [SOLVED] Holy Moley, IF AND INDEX MATCH LEFT confusion
    By bentod in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-16-2014, 05:37 PM
  4. VBA with IE DropDowns
    By mike20255 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-08-2014, 01:52 PM
  5. Excel 2007 : filtering dropdowns with dropdowns?
    By CADiphile in forum Excel General
    Replies: 2
    Last Post: 10-15-2009, 04:11 PM
  6. Help with dropdowns
    By srs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-04-2008, 04:57 AM
  7. Dropdowns and possible "sub dropdowns
    By LeonidasSaveUs! in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2008, 09:55 PM

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