Limit List Box to Certain Rows in a Data Table

ormy28

New Member
Joined
Dec 10, 2007
Messages
20
Office Version
  1. 365
Hi

I am currently working on a very large data set contained within a table that includes two columns, the name of a football club in column A and the level of the club (e.g. first team, reserves, U-23, etc) in column B.

There are hundreds of different 'Clubs', and 10 different 'Levels'. Each Club has differing number of Levels associated with it, some have just 1 and some have all 10.

The user will use a list box to select the name of a football club in D2, and then in E2 I would like them to be able to select a Level, also from a list box. However, I want to limit that list box to only the levels associated with that club.

For example in the below if they were to select 'Preston' in D2, then the drop down list in E2 should only include the options 'First Team' and 'Junior'. If they were to select 'Bolton' in D2, then the drop down list in E2 should include 'First Team', 'U-23', 'Reserves' and 'Junior'.

I know you can create dependent drop down lists by creating named ranges in a separate sheet for each Club, listing all the Levels associated with that Club, then use Indirect in the data validation. This is the method I have used to create the drop down list in D2. However, it isn't really an option here as the data set is huge, and it would take a lot of maintenance as the data set changes over time.

Is there a way to force a drop down list in E2 to contain only the Levels appropriate for the Club selected in D2?

Hopefully the example below make things a bit clearer. One point to note, the data table in columns A and B would be in a different sheet than the Club and Level selections in columns D and E.

Book1
ABCDE
1ClubLevelSelectionSelect Level
2MorecambeFirst TeamBolton
3BoltonJunior
4CarlsileFirst Team
5PrestonFirst Team
6MorecambeU-23
7BoltonU-23
8CarlsileU-23
9CarlsileReserves
10PrestonJunior
11BoltonReserves
12NewcastleFirst Team
13NewcastleReserves
14SunderlandFirst Team
15BoltonFirst Team
16NewcastleU-23
Sheet1
Cells with Data Validation
CellAllowCriteria
D2List=INDIRECT("Clubs")
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Do you just want one data validation cell each (ie D2 & E2) or do you want multiple rows?
 
Upvote 0
Do you just want one data validation cell each (ie D2 & E2) or do you want multiple rows?

Hi. There only needs to be data validation in D2 and E2. The dropdown list in D2 works fine, it's just having the dropdown list in E2 limited to specific Levels dependent on what is selected in D2.
 
Upvote 0
Ok, with a couple of helpers
+Fluff 1.xlsm
ABCDEFGH
1ClubLevelSelectionSelect Level
2MorecambeFirst TeamMorecambeFirst TeamPrestonJunior
3BoltonJuniorBoltonJunior
4CarlsileFirst TeamCarlsile
5PrestonFirst TeamPreston
6MorecambeU-23Newcastle
7BoltonU-23Sunderland
8CarlsileU-23
9CarlsileReserves
10PrestonJunior
11BoltonReserves
12NewcastleFirst Team
13NewcastleReserves
14SunderlandFirst Team
15BoltonFirst Team
16NewcastleU-23
17
Master
Cell Formulas
RangeFormula
D2:D7D2=UNIQUE(A2:A16)
E2:E3E2=UNIQUE(FILTER(B2:B16,A2:A16=G2))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
G2:H2List=D2#
 
Upvote 0
Solution
Excellent, thanks for that. Works a treat.

And thanks for introducing me to the UNIQUE function. That should simplify quite a few things for me in future.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

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