How to create an "if-then" dynamic drop-down list in excel
Tutor 5 (134 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
A dynamic drop-down list in Excel allows the options in a second list to change automatically based on the selection made in the first list. This is often called a dependent drop-down list. It improves data accuracy and reduces errors by limiting choices based on prior selections.
Step 1: Prepare your data
Create a table with all the main categories in one column.
List the dependent items in separate columns for each category.
Example:Column A: Fruits, Vegetables
Column B (Fruits): Apple, Banana, Orange
Column C (Vegetables): Carrot, Broccoli, Spinach
Step 2: Name the ranges
Select the list of dependent items for each category.
Go to Formulas → Define Name.
Assign a name that matches the category exactly (no spaces).
Example:Name the fruit list range as
FruitsName the vegetable list range as
Vegetables
Step 3: Create the first drop-down list
Select the cell for the main category (e.g., A1).
Go to Data → Data Validation.
Choose List in the Allow field.
Enter the source as your category range. Example:
=A2:A3
Click OK.
Step 4: Create the dependent drop-down list
Select the cell where the dependent list should appear (e.g., B1).
Go to Data → Data Validation.
Choose List in the Allow field.
In the Source, enter the formula:
=INDIRECT(A1)
This formula automatically refers to the named range that matches the selection in A1.
Step 5: Test the dynamic drop-down
Choose a category from the first drop-down.
Click the dependent cell to see that the options update according to your selection.
Changing the main category will automatically adjust the dependent list options.
Additional Tips
Ensure category names exactly match the named ranges.
Avoid spaces or special characters in category names; use underscores if necessary.
Use Tables for a scalable approach. Named ranges adjust automatically if you add more items.
Dynamic drop-down lists can be combined with VLOOKUP or INDEX/MATCH for more complex conditional logic.
Example Use Case
A purchase order form where Column A asks for a Product Type (Fruits, Vegetables), and Column B asks for Product Name. Selecting "Fruits" in Column A will only show fruit options in Column B.
This setup ensures 100% data consistency and avoids errors when entering large datasets.
I can create a step-by-step visual guide with screenshots for Windows and Mac to make this setup even easier.
Do you want me to create that visual guide?
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
How to freeze a row in excel
Answers · 1
How to freeze the top three rows in excel
Answers · 1
How to freeze the top two rows in excel
Answers · 1
How to freeze top row excel mac
Answers · 1