A better way to create dependent flexible drop down lists?

Fatabuna

New Member
Joined
Nov 8, 2011
Messages
19
I have a spreadsheet with four dependent drop-down lists in the following cells: </SPAN>

Region – Summary!$C$4</SPAN>
Director – Summary!$C$6</SPAN>
Client – Summary!$C$8</SPAN>
Category – Summary!$C$10</SPAN>

The lists are dependent in this order, i.e. when you select a certain region, Director list is limited to names in that specific region. When you then also select a director, you will only see clients under that Region–Director combination.</SPAN>

The lists are fed from another sheet called “Lists”:</SPAN>

[TABLE="width: 740"]
<TBODY>[TR]
[TD][/TD]
[TD]A</SPAN>
[/TD]
[TD]B</SPAN>
[/TD]
[TD]C</SPAN>
[/TD]
[TD]D</SPAN>
[/TD]
[TD]E</SPAN>
[/TD]
[TD]F</SPAN>
[/TD]
[TD]G</SPAN>
[/TD]
[TD]H</SPAN>
[/TD]
[TD]I</SPAN>
[/TD]
[TD]J</SPAN>
[/TD]
[TD]K</SPAN>
[/TD]
[TD]L</SPAN>
[/TD]
[TD]M</SPAN>
[/TD]
[/TR]
[TR]
[TD]1</SPAN>
[/TD]
[TD]Region</SPAN>
[/TD]
[TD][/TD]
[TD]Region</SPAN>
[/TD]
[TD]Director</SPAN>
[/TD]
[TD][/TD]
[TD]Region</SPAN>
[/TD]
[TD]Director</SPAN>
[/TD]
[TD]Client</SPAN>
[/TD]
[TD][/TD]
[TD]Region</SPAN>
[/TD]
[TD]Director</SPAN>
[/TD]
[TD]Client</SPAN>
[/TD]
[TD]Category</SPAN>
[/TD]
[/TR]
[TR]
[TD]2</SPAN>
[/TD]
[TD]EAST</SPAN>
[/TD]
[TD][/TD]
[TD]EAST</SPAN>
[/TD]
[TD]JOHN</SPAN>
[/TD]
[TD][/TD]
[TD]EAST</SPAN>
[/TD]
[TD]JOHN</SPAN>
[/TD]
[TD]HONDA</SPAN>
[/TD]
[TD][/TD]
[TD]EAST</SPAN>
[/TD]
[TD]JOHN</SPAN>
[/TD]
[TD]HONDA</SPAN>
[/TD]
[TD]HATCHBACK</SPAN>
[/TD]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]
[TD][/TD]
[TD][/TD]
[TD]WEST</SPAN>
[/TD]
[TD]MARK</SPAN>
[/TD]
[TD]FORD</SPAN>
[/TD]
[TD]ESTATE</SPAN>
[/TD]
[/TR]
[TR]
[TD]12</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]WEST</SPAN>
[/TD]
[TD]PETER</SPAN>
[/TD]
[TD]MERCEDES</SPAN>
[/TD]
[TD]SEDAN</SPAN>
[/TD]
[/TR]
[TR]
[TD]13</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]WEST</SPAN>
[/TD]
[TD]PETER</SPAN>
[/TD]
[TD]MERCEDES</SPAN>
[/TD]
[TD]ESTATE</SPAN>
[/TD]
[/TR]
[TR]
[TD]14</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]WEST</SPAN>
[/TD]
[TD]PETER</SPAN>
[/TD]
[TD]MERCEDES</SPAN>
[/TD]
[TD]CONVERTIBLE</SPAN>
[/TD]
[/TR]
[TR]
[TD]15</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]WEST</SPAN>
[/TD]
[TD]PETER</SPAN>
[/TD]
[TD]AUDI</SPAN>
[/TD]
[TD]ESTATE</SPAN>
[/TD]
[/TR]
[TR]
[TD]16</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]WEST</SPAN>
[/TD]
[TD]PETER</SP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[TD]ESTATE</SPAN>
[/TD]
[/TR]
[TR]
[TD]22</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CENTRAL</SPAN>
[/TD]
[TD]BILL</SPAN>
[/TD]
[TD]FIAT</SPAN>
[/TD]
[TD]HATCHBACK</SPAN>
[/TD]
[/TR]
[TR]
[TD]23</SPAN>
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]CENTRAL</SPAN>
[/TD]
[TD]BILL</SPAN>
[/TD]
[TD]FIAT</SPAN>
[/TD]
[TD]SEDAN</SPAN>
[/TD]
[/TR]
</TBODY>[/TABLE]


Since the lists need to be flexible (new clients, director changes, etc.) as well as dependent, I used the following formula to create Director list:</SPAN>

=OFFSET(Lists!$D$1,MATCH(Summary!$C$4,Lists!$C:$C,0)-1,0,COUNTIF(Lists!$C:$C,Summary!$C$4),1)</SPAN>

The Client list formula is a bit longer:</SPAN>

=OFFSET(Lists!$H$1,MATCH(Summary!$C$4,Lists!$F:$F,0)+MATCH(Summary!$C$6,OFFSET(Lists!$G$1,MATCH(Summary!$C$4,Lists!$F:$F,0)-1,0,50000,1),0)-2,0,COUNTIFS(Lists!$F:$F,Summary!$C$4,Lists!$G:$G,Summary!$C$6),1)</SPAN>

The Category list formula is even longer:</SPAN>

=OFFSET(Lists!$M$1,MATCH(Summary!$C$4,Lists!$J:$J,0)+MATCH(Summary!$C$6,OFFSET(Lists!$K$1,MATCH(Summary!$C$4,Lists!$J:$J,0)-1,0,50000,1),0)+MATCH(Summary!$C$8,OFFSET(OFFSET(Lists!$L$1,MATCH(Summary!$C$4,Lists!$J:$J,0)-1,0),MATCH(Summary!$C$6,OFFSET(Lists!$K$1,MATCH(Summary!$C$4,Lists!$J:$J,0)-1,0,50000,1),0)-1,0,50000,1),0)-3,0,COUNTIFS(Lists!$J:$J,Summary!$C$4,Lists!$K:$K,Summary!$C$6,Lists!$L:$L,Summary!$C$8),1)</SPAN>

If I needed to create another level, I doubt the formula would fit. Is there an easier/more elegant way to do this in excel, or would this require VBA?</SPAN>

I am using Windows 7 and Excel 2010.</SPAN>

Many thanks.</SPAN>
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Thanks. Would you be able to copy and paste the code here please? The link takes me to a logon screen of a forum I'm not a member of.
 
Upvote 0
No, it won't, but I prefer not to create one-off accounts left and right.

If it's too much trouble to copy and paste then don't worry about it.
 
Upvote 0
Hi,

I don't have much spare time today to assist but have a look here:Sample Excel Spreadsheets - Excel Templates
They have lots of examples of dependant validation which you may be able to adapt to meet your need and best bit is that you can download for free and without the need to create an account to access.

If you find something that almost does what you want but not sure how to change, post code back here with & explanation & someone here will find time to assist you.

Hope helpful

Dave
 
Upvote 0
Thanks, Dave, I appreciate your help. I'll go through the chapters to see if anything there could be used with some modification.
 
Upvote 0

Forum statistics

Threads
1,223,919
Messages
6,175,368
Members
452,638
Latest member
Oluwabukunmi

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