I want cell A1 to be a drop down menu (which I know how to do), and then cell B1 to be a drop down menu based off that initial selection.
Example:
If I select in A1 "Entertainment," in B1 I want a drop down menu that lets me select "Movies, Music, Sport".
But if I select in A1 "Food," in B1 I want a drop down menu with "Dairy, Veggies, Fruit, Meat" etc.
I know basic coding, but I'm mostly looking to use Excel's capabilities.
Thanks! - Laura
You can create this with some simple formulas. Here's an example set up:
- Create a new workbook with three worksheets "Main", "First Layer", "Second Layer".
- In First Layer, enter in column A: Entertainment, Food.
- In Second Layer, enter in column A: Movies, Music, Sport. Enter in column B: Dairy, Veggies, Fruit, Meat.
- In Main, configure the cell validation of A1 to "list" with the source
='First Layer'!$1:$1
.
- In Main, configure the cell validation of A2 to "list" with the source
=IF($A$1="Entertainment",'Second Layer'!$A:$A,IF($A$1="Food",'Second Layer'!$B:$B,""))
This should get you started.
To make the whole thing a bit more advanced, you might want to use a combination of the VLOOKUP
and the INDIRECT
functions to access the right column in the cell validation list source. Just post a comment if you would like me to extend the example in this direction.
The trick is using indirect function.
Here is the tutorial.
The basic steps are
- Create a reference table in Excel
- Name range of the 2nd layer menu items as the value of 1st layer menu item.
- Use =indirect(cell of the first layer menu) for the 2nd layer menu data validation source.