An Even Easier Way to Create Multi-Level Dependent Drop Down Lists in Excel

Dec 5, 2024 • 6 min read

Dependent drop down lists ought to be easy. Choose a value in one cell, and the next list should show only the relevant options. Add another level, and that list should narrow the choices again.

That is exactly what the custom DDL function does. Once it is in your workbook, creating each list takes just a short formula in Data Validation.

Wyn Hopkins, my co-host on the Unpivot podcast, and I put our heads together to simplify our previous approaches. The result handles multiple dependent lists using the same source range, with an extra lookup argument for each dependency. Pretty easy, right?

What You'll Learn

  • Add the custom DDL function once, then reuse it for each dependent drop down list.
  • Use the same full source range and add preceding selection cells as lookup arguments.
  • Keep lookup references relative so copied validation lists use the correct row.
  • Group source records into hierarchy order, or use DDLSorter to prepare the spill range.

The Example: Franchise, Actor, and Movie

Our source data is an Excel table named Data. It contains three columns, arranged in this order:

  1. Franchise: The movie franchise, such as Star Wars or Harry Potter.
  2. Actor: An actor who appears in that franchise.
  3. Movie: A movie in that franchise featuring that actor.

We want three drop down lists that follow the same hierarchy:

  • Select a franchise in J6.
  • Select an actor from that franchise in K6.
  • Select a movie matching both choices in L6.

For example, choosing Star Wars, then Harrison Ford, should let us select Return of the Jedi from the final list.

There is one important condition: the source data must be grouped into its hierarchy. Franchise records must sit together, and actor records must sit together within each franchise. If your data is in a random order, the DDLSorter function covered below takes care of that.

Add the DDL Function to Your Workbook

DDL is a custom function, not a function already built into Excel. Before creating the lists, add it to your workbook using either of these methods.

Option 1: Copy It from the Example Workbook

The quickest approach is to use the example file available through the free Insiders program. Look for file reference 0238 Even easier dependent drop down lists.zip.

  1. Open the example workbook.
  2. Copy cell N6, which contains the DDL function reference.
  3. Paste it into the workbook where you want to create your lists.

That copy and paste brings the function into the destination workbook. You can then delete the pasted cell contents; the function remains available.

To check it worked, start typing =DDL into a cell. If DDL appears in Excel's formula suggestions, you have it.

Option 2: Create the Named Function Yourself

You can also add DDL directly through Formulas > Define Name.

  1. Enter DDL in the Name box.
  2. Paste the following formula into the Refers to box.
  3. Click OK.
=LAMBDA(range,[lookup1],[lookup2],[lookup3],[lookup4],[lookup5],[lookup6],[lookup7],[lookup8],[lookup9],[lookup10],
LET(
_s, "%^&&@",
lookupValue, lookup1 & _s & lookup2 & _s & lookup3 & _s & lookup4 & _s & lookup5 & _s & lookup6 & _s & lookup7 & _s & lookup8 & _s & lookup9 & _s & lookup10,
levelIndex, IFERROR(ROWS(TEXTSPLIT(lookupValue, , _s, TRUE())), 0) + 1,
lookupArray, BYROW(EXPAND(CHOOSECOLS(range, SEQUENCE(1, levelIndex - 1)), , 10, ""), LAMBDA(row, TEXTJOIN(_s, FALSE, row))),
returnRange, INDEX(range, 0, levelIndex),
result, IF(ISOMITTED(lookup1) * levelIndex = 1, returnRange, XLOOKUP(lookupValue, lookupArray, returnRange):XLOOKUP(lookupValue, lookupArray, returnRange, , , -1)),
result))

Again, type =DDL into a cell to check that Excel recognizes it. Once you have the function in one workbook, you can use the copy-and-paste method to transfer it to another.

Create a Spill Range for the Source Data

Excel tables do not fully work as direct references inside a Data Validation list. We need a spill range, a named range, or a function that returns a range. For this method, we will use a spill range.

In cell F6, enter:

=Data

Here, Data is the table name. The formula spills the table's data into the worksheet, starting at F6.

We can reference that entire spill using F6#. The hash symbol means the full spilled range, rather than just the value in F6.

In the Data Validation formulas below, we will use $F$6# so the source stays fixed when we copy the lists to other rows. If you are using an ordinary cell range instead of a spill range, select the full source range without the hash symbol.

Create the First Drop Down List

The first list has no dependency. It simply uses the first column of our source range.

  1. Select J6.
  2. Open Data > Data Validation.
  3. Set Allow to List.
  4. Enter the following formula in Source.
  5. Click OK.
=DDL($F$6#)
Excel Data Validation dialog with List selected and a DDL formula in the Source box

Open the drop down in J6 and select Star Wars. That is our first list ready.

Create the Dependent Actor List

Now we want K6 to show actors from the franchise selected in J6.

  1. Select K6 and open Data Validation.
  2. Set Allow to List.
  3. Enter this Source formula and click OK.
=DDL($F$6#,J6)

The first argument is still the complete source range. The second argument, J6, tells DDL which franchise to use when finding the actor options.

Keep J6 as a relative reference. If selecting the cell inserts dollar signs, press F4 until they are removed. This lets the dependency move to the correct row when you copy the validation down.

With Star Wars selected, the actor list shows only actors associated with Star Wars. Change the franchise to Harry Potter, and the actor choices change accordingly. Select Warwick Davis to try the next level.

How the DDL Arguments Work

The function follows this pattern:

=DDL(range,[lookup1],[lookup2],...,[lookup10])
DDL syntax diagram labeling the source range and optional lookup arguments
  • range: The complete range containing all the validation options, with the hierarchy running from left to right.
  • lookup1: The selection used to identify options in the second column.
  • lookup2: The additional selection used to identify options in the third column.
  • Further lookups: Additional dependencies, with arguments available through lookup10.

The key is that each list uses the same complete source range. You do not switch to a different source column for each level. Instead, you add the preceding selection cells as lookup arguments.

Add the Third-Level Movie List

The movie list must depend on both the franchise in J6 and the actor in K6.

  1. Select L6 and open Data Validation.
  2. Choose List.
  3. Enter the following Source formula.
  4. Click OK.
=DDL($F$6#,J6,K6)

As before, leave the lookup references J6 and K6 without dollar signs. The list now contains movies matching that specific franchise and actor combination.

You can copy the validation cells down to the rows below. Because the lookup references are relative, each row uses its own franchise and actor selections while continuing to refer to the fixed source spill.

Try another row: select Star Wars, then Harrison Ford, then Return of the Jedi. Three connected lists, with just one extra argument at each step.

Fix Randomly Ordered Data with DDLSorter

There is a catch worth remembering: DDL relies on matching records being grouped together.

The function returns a range from the first matching record to the last matching record. If unrelated records sit between those matches, those records can appear in the drop down too. That is why randomly ordered source data can produce a Star Wars selection containing movies from other franchises.

You have two choices:

  • Sort the source table into hierarchy order.
  • Keep the source table as it is and sort the spill range with DDLSorter.

Add the DDLSorter Function

DDLSorter is available in the example workbook at N11 and can be transferred using the same copy-and-paste approach. Alternatively, use Formulas > Define Name, name it DDLSorter, and paste this formula into Refers to:

=LAMBDA(Range,[SortOrder],SORT(Range, SEQUENCE(, COLUMNS(Range)), SortOrder))

Sort the Spill Range

Replace the formula in F6 with:

=DDLSorter(Data)

With the optional sort order omitted, DDLSorter sorts the columns in ascending hierarchy order. The validation formulas still refer to $F$6#, so there is no need to change them.

For descending order, use -1:

=DDLSorter(Data,-1)

You can also specify a different direction for each column. For our three-column example, this sorts franchise ascending, actor descending, and movie ascending:

=DDLSorter(Data,{1,-1,1})
Excel worksheet with a sorted source spill and an open movie drop down marked Correct options
Sorting the spill into hierarchy order restores the correct drop down options.

For this example, the default ascending sort is all we need. Once the spill is grouped correctly, the dependent lists return the correct options again.

One Function, Reused at Every Level

Once DDL is installed, the setup comes down to a simple pattern: reference the full source range, then add the cells the list depends on.

  • First list: =DDL($F$6#)
  • Second list: =DDL($F$6#,J6)
  • Third list: =DDL($F$6#,J6,K6)

Keep the source grouped into its hierarchy, or let DDLSorter do that for you. With those pieces in place, multi-level dependent drop down lists really can be this straightforward.

Share

Excel Off The Grid

I help you reduce repetitive Excel work with practical guides to formulas, Power Query, reporting, and automation.

© 2026 Excel Off The Grid
Powered by Convella