top of page

You are learning Data Validation in MS Excel

How to use data validation to show a dropdown list based on another cell's value?

To create a dropdown list that depends on the value selected in another cell (cascading dropdown list), you can utilize data validation with the INDIRECT function in Excel. Here's how:

1. Prepare your Data:

- Create two separate lists:
- Main List: This list contains all the possible options for the dropdown list you want to display.
- Dependent List(s): These lists contain options specific to each value in the main list. Each dependent list should be placed in a separate location on your sheet.

2. Set up Data Validation for the Main List:

- Select the cell(s) where you want the main dropdown list to appear.
- Go to the "Data" tab and click "Data Validation" in the "Data Tools" group.
- In the "Settings" tab, under "Allow," choose "List" from the dropdown menu.
- In the "Source" box, enter the cell range containing your main list options (e.g., A1:A10).
- Check the "In-cell dropdown" box (optional) to display the dropdown arrow within the cell.
- Click "OK" to close the Data Validation window.

3. Create the Formula for the Dependent Dropdown List:

- Select the cell(s) where you want the dependent dropdown list to appear. This list will change based on the selection in the main dropdown list.
- Go to the "Data" tab and click "Data Validation" in the "Data Tools" group.
- In the "Settings" tab, under "Allow," choose "List" from the dropdown menu.
- In the "Source" box, enter the following formula:

`=INDIRECT(D2&"!A1:A5")` (Replace D2 with the cell reference containing the main list selection and A1:A5 with the actual range of your first dependent list)

Explanation of the Formula:

- `INDIRECT`: This function takes a text string as input and treats it as a cell reference.
- `D2`: This is the cell reference containing the selection from the main dropdown list.
- `"&"!A1:A5"`: This part combines the selection from the main list with an exclamation mark (!) and the range of your dependent list (A1:A5 in this example). The exclamation mark separates the sheet name (if the list is on a different sheet) from the cell range.

4. Adjust the Formula for Other Dependent Lists:

- If you have more than one dependent list, simply modify the cell range (A1:A5) in the formula to point to the corresponding dependent list for each selection in the main list.

5. Click "OK" to complete the data validation.

Now, when you select a value from the main dropdown list, the dependent dropdown list will automatically update to show only the options relevant to that specific selection.

bottom of page