+ Reply to Thread
Results 1 to 9 of 9

Automatic dropdown change

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    London
    MS-Off Ver
    Excel 2011 Mac
    Posts
    6

    Automatic dropdown change

    Hi

    I am using the combination of "name manager" & "data validation" for a dynamic-like dropdown.


    As shown in the excel, when I select a value from C2 (Main Group), the sublist of C2 would appear in C4 (Sub group).


    But the problem is, C4 (subgroup) does not change "automatically" when the value in C2 is changed. It will only change when I click on the C4 only.

    This can be confusing as the user might look at the wrong value in C7 because they forgot to click on C4.

    Is there anyway to fix this please.

    DataValidation.xlsx

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Automatic dropdown change

    You need an event macro that clears cell C4 whenever a new selection is made in cell C2.

    I'm not much of a programmer but I think I can handle this (as long as it doesn't get more complicated!).

    Right click the sheet tab and select View Code from the menu
    Copy the code below and paste it into the right side of the window that opens.

    Please Login or Register  to view this content.
    Close the window and return to Excel.

    Try it out.

    You'll have to save the file as a macro enabled file in the *.xlsm format.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    London
    MS-Off Ver
    Excel 2011 Mac
    Posts
    6

    Re: Automatic dropdown change

    Hi Tony

    Thanks for this.

    Sorry for not being clear, how can I apply this if I have more than one column in each worksheet.
    For example: C4 is linked to $C$2 ; E4 is linked to $E$2; F4 is linked to $F$2

    so on and so forth....

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Automatic dropdown change

    Yeah, I kind of figured there was more to it.

    I'm not much of a programmer but I think I can handle this (as long as it doesn't get more complicated!).
    At this point someone else will need to take over.

    Good luck!

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automatic dropdown change

    C4 cannot change automatically when you change C2. C2 is referencing a group which has options from which to choose. C2 gives no clue as to what option you want.

    There has to be more to this problem than what you are showing. Perhaps what you are tying to do requires a different approach.

    Can you post a workbook showing what you are actually trying to do? It appears that you need cascading drop down lists but are not willing to accept that each level of the cascade demands that a choice be made.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Automatic dropdown change

    I pretty much have the problem diagnosed.

    They need an event macro to clear the corresponding cells.

    Here's the problem described in a different way...

    A1 is a drop down of car makes: Ford, Chevy, Chrysler.

    B1 is a dependent drop down of car models.

    You select Chevy in cell A1 and Camaro in cell B1.

    You change your mind and you now select Ford in cell A1. Cell B1 still displays Camaro which is an invalid selection for Ford. So, you want to clear cell B1 whenever you make a new selection in cell A1.

  7. #7
    Registered User
    Join Date
    08-07-2012
    Location
    London
    MS-Off Ver
    Excel 2011 Mac
    Posts
    6

    Re: Automatic dropdown change

    Quote Originally Posted by newdoverman View Post
    C4 cannot change automatically when you change C2. C2 is referencing a group which has options from which to choose. C2 gives no clue as to what option you want.

    There has to be more to this problem than what you are showing. Perhaps what you are tying to do requires a different approach.

    Can you post a workbook showing what you are actually trying to do? It appears that you need cascading drop down lists but are not willing to accept that each level of the cascade demands that a choice be made.
    Hi

    Yea, you may be right- I might need a different approach to do this. Basically, I need to be able to compare the score of different groups at the same time.

    I have attached the revised excel in this post: DataValidation.xlsm

    Note: Row 2 and Row 3 are using dropdown list.

    The problem that I have is, when I change the dropdown of the Main Group (Row2), the subgroup (Row4) won't change automatically until I click on it.
    And this will affect the score on Row 7.

    Any better way to do this?

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automatic dropdown change

    That is the way the drop down lists are supposed to work. There is no way to know what the choice is going to be in C4 when you change C2 until you go to C4 and make a choice.

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Automatic dropdown change

    A couple of alternatives to the event macro...

    1. Use a nearby cell to display an alert message to let the user know that they need to make a new selection from the dependent drop down list.

    2. Use conditional formatting to hide the invalid selections from the dependent drop down list. This should alert the user to make a new selection.

+ 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] Automatic date, but after a dropdown selection is made, not before
    By FlyFisherman in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-18-2013, 08:43 PM
  2. Automatic Dropdown list selection, is it possible?
    By Waves852 in forum Excel General
    Replies: 2
    Last Post: 07-14-2013, 03:04 PM
  3. Automatic selection of Date from dropdown list
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2013, 08:57 AM
  4. dropdown list, multiple sheets, automatic fill
    By roybean in forum Excel General
    Replies: 3
    Last Post: 12-09-2009, 05:39 AM
  5. [SOLVED] How do I get automatic completion to work for an in-cell dropdown
    By Joseph Weisblatt in forum Excel General
    Replies: 1
    Last Post: 08-15-2005, 09:05 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