Generate lists based on Column information

excelnewbie08097

New Member
Joined
Apr 21, 2024
Messages
3
Office Version
  1. 365
Platform
  1. MacOS
Hi there,
I have spent hours and hours searching without luck, and therefore and reaching out to the online community! I have tried everything I could find but still am unable to do what I need and, at this stage, doing it Manually would save me time and energy - but I hope you all can help me!
The goal: create 2 drop down menus on a sheet based on criteria entered onto a different sheet (same workbook).

Screenshot 2024-04-21 at 12.44.22.png


I removed the personal data for sharing, but as you can see the Competition is already sorted. What I would like is a formula that will read the competition column, and then give me a list of All teams in the same competition. I would then use this formula to create a data validation list - (If Competition 1 is selected, only teams A,B,C,&D will show up, etc.) more rows will be added, so something dynamic would be great (or I can select more rows in the array too).
For reference - I am using Excel Mac 365 - I do not have an option for Windows. Therefore, Pivot table didnt work (no option to use DAX)
I have tried INDIRECT, IFERROR, INDEX, and XLOOKUP, all give me the first value but not a full list , of ALL teams that are linked to "1", "2", "3", and "4" respectively. I was hoping for something like UNIQUE does when reading a column.
What HAS WORKED - creating a separate "lists" sheets and pulling the data straight from there. The problem, whenever a user enters new data to the "source" sheet, I then need to copy and paste it to the lists sheet.
I know the solution must be simple... and due to that, it's driven me more insane :D - please help!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Maybe this. Don't know what your actual data is like.
Book3
ABCDEFGHIJKL
1TeamCompetition1234selection2
2A1AEIM
3B1BFJN
4C1CGKO
5D1DHLP
6E2
7F2
8G2
9H2
10I3
11J3
12K3
13L3
14M4
15N4
16O4
17P4
Sheet4
Cell Formulas
RangeFormula
E1:H1E1=TOROW(UNIQUE(B2:B17))
E2:H5E2=FILTER($A$2:$A$17,$B$2:$B$17=E1)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
L1List=INDIRECT(CHOOSE(K1,"E2","F2","G2","H2")&"#")
 
Last edited:
Upvote 0
Hi there,

The first part I think is very similar to the solution I ended up finding - however for the Data validation, couldn't quite get it to work, and might be a big task if the data is over 100 different "competitions".

Here is what a user on reddit helped me achieve - I think its the best I have found, but happy to hear from others if there are better solutions out there!

 
Upvote 0
Hi,

Refer to this: Create a dynamic dependent drop down list in Excel an easy way
This is the closest solution I found. You can try to edit the formulas as to fit your columns and rows.


Cheers.
Hi There, yes this is what I have tried, but is not quite there as it is always dependant on referring to the same row. I need the formula to change dynamically with new selections in each row, without needing to write a new formula each time. The video above is the solution, by creating a seperate spill list for each result

thanks though
 
Upvote 1
How about this?
Book3
ABCDEFGHIJK
1TeamCompetition12344O
2A1AEIM
3B1BFJN
4C1CGKO
5D1DHLP
6E2
7F2
8G2
9H2
10I3
11J3
12K3
13L3
14M4
15N4
16O4
17P4
Sheet4
Cell Formulas
RangeFormula
E1:H1E1=TOROW(UNIQUE(B2:B17))
E2:H5E2=FILTER($A$2:$A$17,$B$2:$B$17=E1)
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
K1List=INDIRECT(CELL("address",XLOOKUP(J1,E1#,E2:H2)) &"#")
 
Upvote 0
Hi There, yes this is what I have tried, but is not quite there as it is always dependant on referring to the same row. I need the formula to change dynamically with new selections in each row, without needing to write a new formula each time. The video above is the solution, by creating a seperate spill list for each result

thanks though
Hi there,
Thanks for the video!
I am currently using excel 2016, which I can't use formula "SORT", "FILTER", "UNIQUE", and can't put "#" in the data validation input.

Below is my workaround (following the video shared above), this might be useful for those using excel 2016 or older version:

Step 1: Create table for data
Select the Data range, click "Format as Table"

Step 2: Create Helper table to get unique "Competition" list
Use a new sheet ("Dashboard"), choose a column to list unique "Competition", header "Competition (unique)"
=IFERROR(INDEX(Table1[Primary Competition],MATCH(0,COUNTIF(Dashboard!$I$2:I2,INDEX(Table1[Primary Competition],0)),0)),"")
Drag formula down.

Step 3: Create dropdown for "Competition" - use Data Validation - List
On dropdown menu table, input Header "Primary Competition"
Data validation, select "List", select range from Step2

Step 4: Create SPILL table to get Nth match for "Team" in one competition
On the right side of dropdown menu table, add column "Checking" for validation later, and add a few columns for Nth Match ("Team" from "Competition" chosen) to the right (ie, 1, 2, 3, 4, etc)
Use formula to populate list of team in the chosen "Competition".
=IFERROR(INDEX(Table1[Team],SMALL(IF(Table1[Primary Competition]=$B5,ROW(Table1)-MIN(ROW(Table1))+1),E$4)),"")
Remember to CTRL+SHIFT+Enter for this formula,
Drag formula down & right

Step 5: Create dropdown for "Team" - use Data Validation - List
On dropdown menu table, input "Team" as another header on right side of "Primary Competition"
Data validation, select "List", input =$E5:$J5 (using the range of cell for "Nth match")

Step 6: Checking using "Countif"
Columns "Nth Match" will change dynamically whenever Dropdown for "Competition" changed.
Hence, use these columns to count if the "Team" is existing in the selected "Competition".
Return "Check Team" if the team is not existed in the selected competition.
Formula =IF(C5="","",IF(COUNTIF(E5:J5,C5)=0,"Check Team",""))
Also add conditional formatting to "Team" dropdown menu. (Red when it is not exist)

Step 7: (optional) Hide column "Checking" and Hide columns for "Helper table"
Hide from column D until column L
For my example, I have tried to add new competition & team in Table1, and it populated in the dropdown.

Thanks!

20240422.xlsx
BC
1TeamPrimary Competition
2ACompetition 1
3BCompetition 1
4CCompetition 1
5DCompetition 1
6ECompetition 2
7FCompetition 2
8GCompetition 2
9HCompetition 2
10ICompetition 3
11JCompetition 3
12KCompetition 3
13LCompetition 3
14MCompetition 4
15NCompetition 4
16OCompetition 4
17PCompetition 4
18QCompetition 5
19RCompetition 5
20SCompetition 5
21TCompetition 5
22UCompetition 5
23VCompetition 5
Reference


20240422.xlsx
ABCDEFGHIJKL
1DropDown MenuHelper table
2Competition (Unique)
3Nth MatchCompetition 1
4DatePrimary CompetitionTeamChecking123456Competition 2
523/4/2024Competition 1A ABCD  Competition 3
624/4/2024Competition 3ACheck TeamIJKL  Competition 4
725/4/2024Competition 2E EFGH  Competition 5
826/4/2024Competition 2F EFGH  Competition 6
927/4/2024Competition 3J IJKL   
1028/4/2024Competition 6W W      
1129/4/2024Competition 4M MNOP   
1230/4/2024Competition 5U QRSTUV 
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
Dashboard
Cell Formulas
RangeFormula
E5:J12E5=IFERROR(INDEX(Table1[Team],SMALL(IF(Table1[Primary Competition]=$B5,ROW(Table1)-MIN(ROW(Table1))+1),E$4)),"")
D5:D22D5=IF(C5="","",IF(COUNTIF(E5:J5,C5)=0,"Check Team",""))
L3:L22L3=IFERROR(INDEX(Table1[Primary Competition],MATCH(0,COUNTIF(Dashboard!$L$2:L2,INDEX(Table1[Primary Competition],0)),0)),"")&""
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C5:C22Expression=$D5="Check Team"textNO
Cells with Data Validation
CellAllowCriteria
B5:B22List=$L$3:$L$22
C5:C22List=$E5:$J5
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,116
Members
453,021
Latest member
Justyna P

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