How to create a Dynamic multiple drop-down list?

PetarTen

Board Regular
Joined
Oct 3, 2024
Messages
64
Office Version
  1. 2016
Platform
  1. Windows
Hi Folks,
Attached you can find Table-3 version from a Project that I thought would be an easy one:(
The idea is simple - to make a Dynamic relation between the Dropdown Lists.
I purposely add a blank row in the first (far left A2 cell), so the Table should have a "rest" before engage;)
The moment we choose BP or any other OIL brand, the other two Dropdown lists should FILL IN.
For example, we choose BP, the Four (cylinder Engine pops up) and the 2.8L Capacity too.
When Six is chosen , the 3.85L Capacity should appear automatically.
That's all:)
If someone has an Idea of implementing a new Working Sheet and use the Developer mode (taking info from Data Validation I have created) - please, be my guest to experiment!
I'd highly appreciate that approach🙏

Filebin | 99n0x3jo0fx5a1qk

PS Should NOT have this:
1732459317247.png


When the Blank row is hit - the other two Dropdown lists must become blank too!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Is VBA an option? if not, can we add a hidden sheet to be used as a helper?

-Ross
Yes, Ross - everything is allowed!
Few things tho....
It should run on Office 2016 (I can use .xlsm files for sure)
It should NOT be too complicated and drain CPU resources.
And - the Developer should like it while making (coding) it.
You know, everybody has their own style, but there ARE some situations when the Obvious Better Choice is there and simply must be used ;)
That's it.
 
Upvote 0
This appears to be the same question you already asked here, is it not? Please continue in that thread.
Also, this is not the only forum you have posted it on, so please post all the relevant cross-post links per the forum rules to that thread.
Thanks.
 
Upvote 0
right click on you sheet - view code. paste the blow code into the module.

it will clear the other drop down when you pick a new "Oil"

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    ' Check if the changed cell is A2
    If Not Intersect(Target, Me.Range("A2")) Is Nothing Then
        ' Ensure the code runs only for a single cell change
        If Target.Cells.Count = 1 Then
            ' Place your code here
            Range("B2:C2") = ""
        End If
    End If

    ' Check if the changed cell is B2
    If Not Intersect(Target, Me.Range("B2")) Is Nothing Then
        ' Ensure the code runs only for a single cell change
        If Target.Cells.Count = 1 Then
            ' Place your code here
            Range("C2") = ""
        End If
    End If
End Sub
 
Upvote 0
Solution
right click on you sheet - view code. paste the blow code into the module.

it will clear the other drop down when you pick a new "Oil"

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    ' Check if the changed cell is A2
    If Not Intersect(Target, Me.Range("A2")) Is Nothing Then
        ' Ensure the code runs only for a single cell change
        If Target.Cells.Count = 1 Then
            ' Place your code here
            Range("B2:C2") = ""
        End If
    End If

    ' Check if the changed cell is B2
    If Not Intersect(Target, Me.Range("B2")) Is Nothing Then
        ' Ensure the code runs only for a single cell change
        If Target.Cells.Count = 1 Then
            ' Place your code here
            Range("C2") = ""
        End If
    End If
End Sub
WOW!
Amazing! :)
How to Save the file?
Because I tried with "Save" and it deleted everything :(

1732577922863.png
 
Upvote 0
Look what is happening when I hit the "Save" button....then exit from Office and get back to it :(

1732578721851.png


Maybe I have to tweak something here?

1732578958015.png
 
Upvote 0
If there was an option to do the same for this Project here:

How to create a multiple drop-down lists in Excel using Developer?

That would be even GREATER! :cool:

I tried to use the Developer Mode for the same task but it became to complicated and I was told that Developer Mode requires Relation between the Dropdown lists.
Something which I failed to deliver.
Can you take a look at this project too?
 
Upvote 0

Forum statistics

Threads
1,223,983
Messages
6,175,778
Members
452,668
Latest member
mrider123

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