How to create a drop down list based on condition
Tutor 5 (134 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
A drop-down list based on a condition is known as a dependent drop-down list. This feature allows one drop-down menu to change its options dynamically depending on the selection in another cell. It is widely used for forms, surveys, and data validation where choices are interrelated.
Steps to Create a Conditional Drop-Down List
Prepare the Data
Organize your data into categories and subcategories.
Example:
Category Items
Fruits Apple
Fruits Banana
Fruits Orange
Vegetables Carrot
Vegetables Broccoli
Vegetables Spinach
Place the main categories in one column (e.g.,
A2:A3) and corresponding items in another column.
Define Named Ranges
Highlight the list of items for each category.
Go to the Formulas tab → Define Name.
Name the range exactly as the main category (e.g., "Fruits", "Vegetables").
Ensure the name contains no spaces. Replace spaces with underscores if needed.
Create the First Drop-Down (Category)
Select the cell where the first drop-down will appear (e.g.,
D2).Go to Data → Data Validation → Data Validation.
Under Allow, choose List.
In Source, type the range or named range for categories:
=A2:A3
Click OK.
Create the Conditional Drop-Down (Items)
Select the cell for the second drop-down (e.g.,
E2).Go to Data → Data Validation → Data Validation.
Under Allow, choose List.
In Source, use the
INDIRECTfunction to reference the first drop-down:=INDIRECT(D2)
Click OK.
Test the Drop-Down
Select a category in the first drop-down (e.g., "Fruits").
The second drop-down will now show only the items associated with that category (Apple, Banana, Orange).
Notes and Tips
INDIRECT function: Converts text to a reference. It allows Excel to look up the named range corresponding to the category.
Named ranges: Must match the text in the first drop-down exactly. Avoid spaces.
Dynamic lists: For lists that may change, you can use dynamic named ranges with formulas like
OFFSETorTABLE.Mac Differences: The steps are the same on Mac Excel, but menus may appear slightly differently. On some versions, go to Excel → Preferences → Data → Data Validation.
Example
Suppose D2 contains "Vegetables" and you have defined a named range "Vegetables" containing Carrot, Broccoli, Spinach. The formula:
=INDIRECT(D2)
will pull the items under "Vegetables" for the second drop-down.
This setup ensures that your drop-down menu dynamically updates based on the selection in the first cell, reducing errors and improving efficiency in data entry.
. 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