Tabellab
Excel formulas

Dependent drop-down list in Excel: the second list follows the first

A dependent drop-down list shows only the choices that fit the value picked in another cell: choose Fruit in the first list and the second list offers only fruit. In current Excel you build it with a helper formula and data validation: =SORT(FILTER(B2:B11,A2:A11=E14)) in E2 returns the items of the chosen category, and the second cell uses Data > Data Validation > List with the source =$E$2#. In the example, the category Fruit gives a list of 4 items: Apple, Cherry, Pear and Plum. In older versions the classic method uses one named range per category and =INDIRECT($E$14) as the source.

Updated 30 Oct 2026 6 min read By Tabellab team

How a drop-down list works in Excel

A drop-down list is a data validation rule. Select the input cell, open Data > Data Validation, choose Allow: List and enter a Source. The source can be a typed list such as Fruit,Herbs,Vegetables, a range such as =$D$2:$D$4, a spill reference such as =$D$2#, or a formula that returns a reference, such as INDIRECT or OFFSET.

Two details matter for dependent lists. First, the Source box does not accept a formula that returns an array, such as FILTER or UNIQUE written directly into the box, so the dynamic list has to live in helper cells that the source points to. Second, the rule only checks entries typed or picked in the cell. Values pasted into the cell overwrite the rule, and a value that was valid stays in the cell when the first list changes. Both points are covered by a check formula in the example.

Step by step: the FILTER method (Microsoft 365, Excel 2021+)

  1. Keep the choices as a two-column table: category in A2:A11, item in B2:B11. New items are simply new rows; the order does not matter.
  2. In D2, enter =SORT(UNIQUE(A2:A11)). It spills the three categories Fruit, Herbs and Vegetables into D2:D4.
  3. Select E14, the first drop-down cell, and set Data Validation to List with the source =$D$2#. The # sign refers to the whole spill range, so a new category appears in the list automatically.
  4. In E2, enter =SORT(FILTER(B2:B11,A2:A11=E14)). With Fruit in E14 it spills Apple, Cherry, Pear and Plum into E2:E5.
  5. Select E15, the second drop-down cell, and set the source to =$E$2#. Pick Herbs in E14 and the second list immediately shows Basil, Mint and Thyme.

This method needs no named ranges and no special sorting, and it works for any number of categories. Hide the helper columns or move them to a separate sheet if they should not be visible; the drop-down cells keep working. If the first cell is still empty, FILTER finds nothing and returns #CALC!; add a third argument, for example FILTER(B2:B11,A2:A11=E14,""), to show an empty list instead.

The classic INDIRECT method (all Excel versions)

Before dynamic arrays, the standard way was one named range per category. Put the items of each category in their own column, select them and type the category name into the Name Box, for example Fruit for the four fruit cells. The second drop-down then uses the source =INDIRECT($E$14): INDIRECT turns the text "Fruit" in E14 into a reference to the range called Fruit.

This works in every version, but it is fragile. Names cannot contain spaces, so a category such as "Root vegetables" needs a name like Root_vegetables and the source =INDIRECT(SUBSTITUTE($E$14," ","_")). Each new category needs a new name, and a typo in a name silently gives an empty list. INDIRECT is also volatile, which means it recalculates with every change in the workbook. For new files the FILTER method is easier to maintain; see named ranges for how names and their scope work.

Worked example: categories and items with two helper lists

The yellow cells are the source table (A2:B11) and the two drop-down cells E14 and E15. Columns D and E are the helper lists the drop-downs point to. Hover over a green cell to see its formula.

Worked example: categories and items with two helper lists
ABCDE
1CategoryItemList 1: categoriesList 2: items
2FruitAppleFruitApple
3VegetablesCarrotHerbsCherry
4FruitPearVegetablesPear
5HerbsBasilPlum
6VegetablesLeek
7FruitPlum
8HerbsMint
9VegetablesKale
10FruitCherry
11HerbsThyme
12
13Drop-down cells and checksValue
14Drop-down 1: category (Source =$D$2#)Fruit
15Drop-down 2: item (Source =$E$2#)Plum
16Number of items in the chosen category4
17Does the item still belong to the category?Valid
18Category of the chosen item (reverse lookup)Fruit
19Number of categories in drop-down 13
20Items of the chosen category as one lineApple, Cherry, Pear, Plum
Key formulas
  • D2=INDEX(SORT(UNIQUE($A$2:$A$11)),1)Helper list 1, first entry (in Excel: =SORT(UNIQUE(A2:A11)))
  • E2=INDEX(SORT(FILTER($B$2:$B$11,$A$2:$A$11=$E$14)),1)Helper list 2, first entry (in Excel: =SORT(FILTER(B2:B11,A2:A11=E14)))
  • E16=COUNTIF($A$2:$A$11,$E$14)How many items list 2 offers
  • E17=IF(COUNTIFS($A$2:$A$11,$E$14,$B$2:$B$11,$E$15)>0,"Valid","Pick again")Check that the pair still fits
  • E20=TEXTJOIN(", ",TRUE,SORT(FILTER($B$2:$B$11,$A$2:$A$11=$E$14)))The dependent list as one line

Fictional lists. In Excel, D2 and E2 each hold one spilling formula and the drop-downs use the sources =$D$2# and =$E$2#; the grid shows each spilled value in its own cell with INDEX(…,k) so it can be checked.

Keep the two cells consistent

Data validation does not clear the second cell when the first one changes. If someone picks Fruit and Plum and then switches the category to Herbs, E15 still says Plum. A check formula catches this: =IF(COUNTIFS(A2:A11,E14,B2:B11,E15)>0,"Valid","Pick again") counts the rows with exactly this category and item, so it returns Valid for Fruit and Plum and Pick again after the switch. Use the same test in a conditional formatting rule to colour the cell, or in a total that should only count valid rows.

On the Error Alert tab of the validation dialog, the style Stop blocks entries that are not in the list, while Warning and Information allow them after a message. For an input form, Stop is usually right. The option Ignore blank lets the cell stay empty, and In-cell dropdown must be ticked for the arrow to appear.

More than two levels, tables and other tips

A third level, such as category, item and variety, follows the same pattern: a third column in the source table and a helper list with two conditions, =SORT(FILTER(C2:C50,(A2:A50=E14)*(B2:B50=E15))). Each level is just another FILTER condition, multiplied for AND.

If the source data is an Excel table, the validation Source box does not accept structured references such as Table1[Category] directly. The helper formulas can use them, though, and the spill references =$D$2# and =$E$2# then pass the result to the drop-downs. To show the chosen category's items on a form, =TEXTJOIN(", ",TRUE,SORT(FILTER(…))) joins them into one line: Apple, Cherry, Pear, Plum.

Common mistakes

  • Typing FILTER into the Source box. Data validation rejects formulas that return arrays. Put the FILTER formula in a helper cell and use its spill reference, such as =$E$2#, as the source.
  • Forgetting the # in the source. =$E$2 gives a list with one entry. =$E$2# includes the whole spill range and grows with it.
  • Relative references in the rule. A source like =INDIRECT(E14) applied to several rows shifts in each row. Use $E$14 for one fixed input, or a relative reference on purpose when every row has its own first drop-down.
  • Names that do not match the category. With the INDIRECT method, "Root vegetables" cannot be a name, and an extra space in the category text breaks the link. Use SUBSTITUTE and clean the values with TRIM.
  • Relying on validation alone. Pasted values and changed first selections are not checked. Add a check formula like the COUNTIFS test in the example.

Frequently asked questions

How do I create a dependent drop-down list in Excel?

Put the choices in a two-column table, create a helper list with =SORT(FILTER(items,categories=first_cell)) and set the second cell to Data Validation, List, with the helper's spill reference such as =$E$2# as the source. In older Excel versions, use one named range per category and =INDIRECT(first_cell).

Can I use the FILTER function in data validation?

Not directly in the Source box, because it only accepts lists and references. Enter the FILTER formula in a helper cell and point the validation source to its spill range with the # sign.

Why is my dependent drop-down list empty?

The first cell is empty or its text does not match the categories exactly, for example because of an extra space. With the INDIRECT method, the named range may be missing or spelled differently from the category.

How do I clear the second drop-down when the first one changes?

Data validation cannot do this by itself. Use a check formula such as =IF(COUNTIFS(cats,first,items,second)>0,"Valid","Pick again") and highlight the cell with conditional formatting, or use a macro if the cell must be cleared automatically.

Do dependent drop-down lists work in Google Sheets?

Yes. Google Sheets data validation accepts a range as the list source, so the same helper-list approach with FILTER works there as well.

Practise it in a lab

Related guides

Reading is step one. Doing is step two.

Every guide links to a lab where you build the same calculation in an online spreadsheet and get instant feedback.

Open the lab