3 level dependant dropdown help (no macros)

Akira181

Board Regular
Joined
Mar 23, 2010
Messages
67
Office Version
  1. 365
Platform
  1. Windows
I’m trying to create a dependant dropdown list 3 levels deep. I’ve been trying to avoid all macros to keep it simple but I cannot get the 3rd level to work properly. I tried using offsets to create dynamic named lists, then a combination of the Indirect and Substitute functions in the data validation to create the drop down

One of the problems I'm having is that the named ranges are similar in name and some of them start with a number, making the substitute function not work properly. Can someone tell me the best way to do this without using a macro?
 

Attachments

  • Capture.PNG
    Capture.PNG
    40 KB · Views: 28

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Start by separaing the validation lists in three tables with the dependecy to the previous level.
This is to avoid duplicates in the first two levels.
I will try to elaborate and suggest a solution later.
 
Upvote 0
Hi Akira181,

I'm struggling understanding the purpose of E1 to G6 so I'll assume it's just a work area to build the Data Validation lists.
You don't say what version of Excel you use as this would be easier with the latest versions but here's my Excel 2016 approach.

Akira181.xlsx
ABCDEFG
1SystemSubsystemComponentSystemSubsystemComponent
2EngineAirboxFilterEngineAirboxTyres
3EngineAirboxSensorCar Interior4 WheelsAlloys
4Engine4 WheelsTyres7 Seater  
5Engine4 WheelsAlloys   
6Car InteriorCar Interior5 Seats   
7Car InteriorCar Interior4 MatsSystemSubsystemComponent
8Car InteriorelectricsLightsEngine4 WheelsAlloys
9Car InteriorelectricsRadio
107 Seater7 Seaterrunning out of examples
117 Seater7 Seaterseats
12
Example
Cell Formulas
RangeFormula
E2:E6E2=IFERROR(INDEX(A$2:A$12,AGGREGATE(15,6,ROW($A$2:$A$12)-ROW($A$1)/((ISNA(MATCH(A$2:A$12,E$1:E1,0)))),1))&"","")
F2:F6F2=IFERROR(INDEX(B$2:B$12,AGGREGATE(15,6,ROW($A$2:$A$12)-ROW($A$1)/((ISNA(MATCH(B$2:B$12,F$1:F1,0))*($A$2:$A$12=$E$8))),1))&"","")
G2:G6G2=IFERROR(INDEX(C$2:C$12,AGGREGATE(15,6,ROW($A$2:$A$12)-ROW($A$1)/((ISNA(MATCH(C$2:C$12,G$1:G1,0))*($A$2:$A$12=$E$8)*(B$2:B$12=$F$8))),1))&"","")
Cells with Data Validation
CellAllowCriteria
E8:G8List=OFFSET(E$2,,,COUNTIF(E$2:E$6,"> "))
 
Upvote 0
Solution
Hi Akira181,

I'm struggling understanding the purpose of E1 to G6 so I'll assume it's just a work area to build the Data Validation lists.
You don't say what version of Excel you use as this would be easier with the latest versions but here's my Excel 2016 approach.

Akira181.xlsx
ABCDEFG
1SystemSubsystemComponentSystemSubsystemComponent
2EngineAirboxFilterEngineAirboxTyres
3EngineAirboxSensorCar Interior4 WheelsAlloys
4Engine4 WheelsTyres7 Seater  
5Engine4 WheelsAlloys   
6Car InteriorCar Interior5 Seats   
7Car InteriorCar Interior4 MatsSystemSubsystemComponent
8Car InteriorelectricsLightsEngine4 WheelsAlloys
9Car InteriorelectricsRadio
107 Seater7 Seaterrunning out of examples
117 Seater7 Seaterseats
12
Example
Cell Formulas
RangeFormula
E2:E6E2=IFERROR(INDEX(A$2:A$12,AGGREGATE(15,6,ROW($A$2:$A$12)-ROW($A$1)/((ISNA(MATCH(A$2:A$12,E$1:E1,0)))),1))&"","")
F2:F6F2=IFERROR(INDEX(B$2:B$12,AGGREGATE(15,6,ROW($A$2:$A$12)-ROW($A$1)/((ISNA(MATCH(B$2:B$12,F$1:F1,0))*($A$2:$A$12=$E$8))),1))&"","")
G2:G6G2=IFERROR(INDEX(C$2:C$12,AGGREGATE(15,6,ROW($A$2:$A$12)-ROW($A$1)/((ISNA(MATCH(C$2:C$12,G$1:G1,0))*($A$2:$A$12=$E$8)*(B$2:B$12=$F$8))),1))&"","")
Cells with Data Validation
CellAllowCriteria
E8:G8List=OFFSET(E$2,,,COUNTIF(E$2:E$6,"> "))

Yeah, it was just a working area to try and build the lists, should have mentioned. Also, I'm using Office 365. I figured it out in the end using Indirect(substitiute(xx)) for the second level and the solution here (also your post!) for the third level how to create dependent dropdown list in Excel

I feel like it could be done cleaner but I've spent too much time messing around to continue trying. It works so that's good enough for me. Thanks!
 
Upvote 0
The question was presented with one row for dropdowns. If you want more then the System can be created in one place but the data list for the Subsystem and Component dropdowns will need to be built for each row.

What is the maximum number of unique entries for Subsystem and Component?
How many rows of dropdowns are needed?
I can then use the columns to the right of G to build the selection lists... but the execution time will increase with large numbers.
 
Upvote 0
The question was presented with one row for dropdowns. If you want more then the System can be created in one place but the data list for the Subsystem and Component dropdowns will need to be built for each row.

What is the maximum number of unique entries for Subsystem and Component?
How many rows of dropdowns are needed?
I can then use the columns to the right of G to build the selection lists... but the execution time will increase with large numbers.

I managed to build the data lists by modifying the formula you posted in the other thread. I was just wondering if there was a way to do it without building the lists but no matter, it works so not going to spend anymore time on it.

Thanks!
 
Upvote 0
You're welcome.
Glad you got it to work. I don't think there's a more elegant way unless you're using 365 or resort to VBA.
 
Upvote 0

Forum statistics

Threads
1,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

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