how to update Options under a drop down list when a linked drop down list is changed?

hrithik

Active Member
Joined
Jul 26, 2010
Messages
336
I have a drop down list in $A$1 with options (fruits, Cake, Drinks)

Another drop down list in $B$1 shows these groups {apple, orange}, {cheese,chocolate}, and {soda,water} depending on the option selected in $A$1.

I'm using name ranges and Indirect() to link these two drop downs.

The problem I face is;
Firstly "fruits" is selected in $A$1 and "apple" in $B$1
Now if I select "Drinks" in $A$1, $B$1 still shows "apple".
I want $B$1 to update itself automatically whenever $A$1 cell is changed.

Is this possible?
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Right-click on the sheet tab with the drop-down lists. Select "View Code" from the pop-up menu. Paste the code below in the VBA edit window.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Address = "$A$1" Then Range("B1").ClearContents
    
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top