+ Reply to Thread
Results 1 to 11 of 11

Reset Dropdown Lists based on Other inputs / cells

  1. #1
    Registered User
    Join Date
    07-01-2009
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    4

    Reset Dropdown Lists based on Other inputs / cells

    Hi all,

    Trying to create a dynamic costing spreadsheet, where the user has to make multiple selections from many dropdown lists, all of which end up showing a total cost.

    So far I have managed to create relatively dynamic lists, so that the choice in one cell will dictate what options are available in the next.

    But if a user selects an options form all the dropdowns, and then decides to go back and modify a previous option to something else, the effected dropdown lists do not change until you click on the drop down arrow again and see the options available have changed.

    Let me try and simplify...
    'Menu 1' has two option: 'A' and 'B'.
    If 'A' is chosen, then the next menu, 'Menu 2', will have options '1' and '2'.
    If 'B' is chosen from 'Menu 1', then the options in 'Menu 2' will be '3' and '4'.
    Lets say the user chose 'A' from 'Menu 1' and then '1' from 'Menu 2'... AND THEN went back and changed their choice in 'Menu 1' to 'B'....
    'Menu 2' will still be displaying '1', even though the options are only '3' and '4'.

    Can I make the dependant menu's either reset or blank or highlight to show that a change made somewhere else has made them currently invalid?

    Hope that makes sense.

    Thanks in advance.

    Jon

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Reset Dropdown Lists based on Other inputs / cells

    You need to specify what type of drop down you are referring to.

    An example workbook would help
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-01-2009
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Reset Dropdown Lists based on Other inputs / cells

    Hi Roy,

    OK more info... it actually now develops a bit further. The way I have been doing my dynamic menu is not great. I am using IF statements to dictate what options appear in the named range. The drop down is basically just a validation list =named_range type. What appears in the list is either values or blanks (so not good as you get blank 'options')

    See my attached example. Sheet MENUS refers to data on sheet DATA.

    So that is something else that could probably be better.

    But whether I do it that way or another way, my question is if 'A' is chosen, then one of the available options in Menu2... then changing to 'B' will leave Menu2 still showing previous (now invalid) option, until the drop down is selected again, and the user realises their current option is no longer valid.

    This would easily lead to errors when there are many menus... I want the spreadsheet to be a dynamic sheet where each change will highlight/blank/reset other dependant menus so there are no errors based on previous, now invalid options.

    Hope I am making sense.

    Cheers.

    Jon
    Attached Files Attached Files
    Last edited by jonreynolds; 07-01-2009 at 06:05 AM. Reason: UPDATED ATTACHMENT

  4. #4
    Registered User
    Join Date
    07-01-2009
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Reset Dropdown Lists based on Other inputs / cells

    Anyone able to offer any ideas on this?

    Perhaps something to do with 'onevent' or something... sorry not very clued up on vba. But this spreadsheet is going to grow, so the ability to highlight/reset incompatible cells is important to avoid errors.

    Thanks again.

  5. #5
    Registered User
    Join Date
    07-01-2009
    Location
    uk
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Reset Dropdown Lists based on Other inputs / cells

    Well for now I have solved it in a more basic way using conditional formatting on the menu cells to change colour (i.e. to red) when their value is not in the source list. Using the following formula:

    Please Login or Register  to view this content.
    So that simply checks if the current value is in my dynamic list (which is based on other menu choices) if not, i.e. =0, then it colours red, to highlight attention to non-valid cells.

    I then add a second conditional format:

    Please Login or Register  to view this content.
    Which is set to highlight green, if the value is within the named range. Therefore valid.

    Cheers.

  6. #6
    Registered User
    Join Date
    07-17-2009
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Reset Dropdown Lists based on Other inputs / cells

    Thanks for posting your work around Jon.

    I have the exact same issue in a workbook I've created - if anyone knows how to automatically have the dependent list reset itself (jon's menu 2) when the original list is changed (jon's menu 1) using code I'd love to see it.

    I tried using the following code, but it makes my workbook 'shudder'. Any ideas how to get that to go away?

    Please Login or Register  to view this content.
    Last edited by sting!; 07-17-2009 at 06:43 PM.

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

    Re: Reset Dropdown Lists based on Other inputs / cells

    .Perhaps this link can be of help? A sample workbook download is available.
    Data Validation List Based on the Value of Another



    Sting:
    I tried using the following code, but it makes my workbook 'shudder'. Any ideas how to get that to go away?
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    07-17-2009
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Reset Dropdown Lists based on Other inputs / cells

    Thank you for your reply. I will give this link a try on Monday!

  9. #9
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Reset Dropdown Lists based on Other inputs / cells

    Here's a sample created based on the link given above.
    modytrane
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    07-17-2009
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Reset Dropdown Lists based on Other inputs / cells

    Thank you for posting the sample.

  11. #11
    Registered User
    Join Date
    08-12-2009
    Location
    Austin, TX
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Reset Dropdown Lists based on Other inputs / cells

    Quote Originally Posted by modytrane View Post
    Here's a sample created based on the link given above.
    modytrane
    I must be doing something wrong - your sample makes sense, but i can't get it to work for me. am i supposed to type something into the indirect formula in the quotes??

    stupid mistake...i just needed to change the "A1" to fit my spreadsheet!! THANK YOU ALL!

+ 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