Download the Dynamic Arrays Practice File
Build both drop-down lists yourself with UNIQUE, FILTER and SORT. Practice on the Division and App data from the video, then compare your formulas with the finished version.
Why Dynamic Arrays Replace Complex Formulas
If you have ever worked with complex formula combinations (see intimidating example below), or advanced formulas that require the use of a CTRL-Shift-Enter, you have no doubt become known as the “Excel Guru” or formula expert of your office.
There are very few Excel users that enjoy creating such complicated formulas, and even fewer who enjoy deciphering these kinds of formulas made by users who have left the company and provided no documentation on the logic of such a creation.
Microsoft announced dynamic arrays at its Ignite conference in 2018. Today they work in Microsoft 365, Excel 2021 and later, and Excel for the web. Excel 2019 and older don’t have them.
What Are Dynamic Arrays in Excel
Dynamic Arrays are not simply a new batch of functions added to the Excel Function Library.
Excel’s calculation engine was updated so one formula can return many results at once.
To see the difference, let’s rebuild two older solutions with dynamic arrays and compare the formulas side by side.
Check out the blog post and video here.
For more details, check out this post.
We will also demonstrate the simplicity and brevity of the formulas by comparing their lengths and steps, both sequential and nested steps.
The Old Way: Dependent Drop-Downs with Long Formulas
Below we have a list by Division. The Divisions are not grouped together; they are randomly arranged and each Division has an associated App.

The data validation drop-down includes a unique list of Division names. A second unique list of Apps is created and associated with the Division dropdown list. When the user selects a Division, the App dropdown list changes to reflect only Apps related to the selected Division.

For these lists to interact with one another, a cross-tabular data preparation table was created that lists all the Divisions in row order and all the associated Apps in column order.

Look at the formula used to create and dynamically manage the data preparation table.
=IF($D9<COLUMNS($F$7:F$7),"",INDEX(TableDiv[[App]:[App]],AGGREGATE(15,3,(TableDiv[[Division]:[Division]]=$E9)/(TableDiv[[Division]:[Division]]=$E9)*(ROW(TableDiv[Division])-ROW(TableDiv[[#Headers],[Division]])),COLUMNS($F$7:F$7))))Even the most battle-hardened Excel veteran gets an uneasy feeling when presented with such a formula.
Remember the second dropdown list that is dependent on the selection made in the first dropdown list? Look at the formula (stored as a Data Validation rule) used to coordinate this conversation.
=OFFSET($F$7,MATCH($E$4,$E$8:$E$17,0),,1,COUNTIF(OFFSET($F$7,MATCH($E$4,$E$8:$E$17,0),,1,20),"?*"))When the formula compiles the App list, it is smart enough to stop at the last App and not include any empty cells which may be located at the bottom of the table.
Create the First Drop-Down List with UNIQUE
We will still need to create a data preparation table, but this table will use one of the new array functions. This function superhero is named UNIQUE. The structure for the Unique function is as follows:
=UNIQUE(array, [by_col], [occurs_once])The only required variable is the first argument, “array”. In UNIQUE‘s simplest form, we will provide the function with the cell range containing the Divisions and press Enter.
=UNIQUE(Table1[Division])Observe the results.

Observe that even though we entered the formula in a single cell, and we did NOT utilize CTRL‑Shift‑Enter; the formula’s results occupy several cells. When a formula returns more than one result, the additional results “spill” into the adjacent rows.
What is even more exciting is that the original first dropdown list that displayed Divisions can refer to this new “spill list” as a source.
If we return to the Data Validation option for the Division dropdown, we don’t refer to the current list as the source (i.e. E8:E10); this is because the Division list may expand, and the dropdown would not display the additional Divisions. All we need to do is refer to the FIRST cell where we originally entered the Unique function.
There is no need to select the entire list.
Point Data Validation to the Spill Range
There is, however, a new syntax requirement when referring to “spilled arrays”. After you select the original cell containing the Unique function, add a # (pound or hashtag) symbol to the end of the reference.
=E8 becomes =E8#
The # sign works in any formula, not just in Data Validation. Here’s when to use the hash sign in Excel formulas.
Add New Data Without Breaking the List
What happens if you add a new Division to the table? Does the spill range pick it up?
If your Division list has been formatted as a Data Table, adding new Divisions will be absorbed into the existing table.
If your list is not an Excel Table, you can include extra empty rows in the range. Empty cells show up as a 0 in the UNIQUE result, so filter them out first:
=UNIQUE(FILTER(A4:A100, A4:A100<>""))
Create the Dependent Drop-Down List with FILTER
Now for the more complicated part of this problem: the dependent App dropdown list. The new Dynamic Array FILTER function will solve this problem. The Filter function has the following structure:
=FILTER(array, include, [if_empty])For the “array” argument, we will provide it the list of Apps. Because we only want to see Apps related to a selected Division, we will provide the “include” argument the list of Divisions and compare that list to the selected Division.
=FILTER(Table1[App],Table1[Division]=E4)This creates the requested “filtered” list of Apps based on the selected Division.

To feed these Apps to the second dependent dropdown, return to the cell and set the Data Validation rule to point to the cell containing the Filter function (the first answer in the FILTER “spill range”).
=F8#
If we select a different Division from the first dropdown, the options for the second dropdown change to match.

Sort Both Drop-Down Lists with SORT
Now that we have our unique lists, what if we need them sorted?
Previously, to sort our unique Division and App lists was a daunting task.
Not anymore.
SORT is a new function superhero. The structure for the SORT function is as follows:
=SORT(array, [sort_index], [sort_order], [by_col])The function supports arguments that allow control over the sort criteria, sort order, and sort direction. In this example, we will only include the array of values to be sorted and accept the defaults for all remaining arguments.
=SORT(UNIQUE(Table1[Division]))The Divisions are now sorted.

We will apply the same SORT feature to our second “spilled array”.
=SORT(FILTER(Table1[App],Table1[Division]=E4))We now have a sorted list of Apps.

Old Formulas vs Dynamic Array Formulas
Let’s compare these two formulas.
Old Formulas:
=IF($D9<COLUMNS($F$7:F$7),"",INDEX(TableDiv[[App]:[App]],AGGREGATE(15,3,(TableDiv[[Division]:[Division]]=$E9)/(TableDiv[[Division]:[Division]]=$E9)*(ROW(TableDiv[Division])-ROW(TableDiv[[#Headers],[Division]])),COLUMNS($F$7:F$7))))=OFFSET($F$7,MATCH($E$4,$E$8:$E$17,0),,1,COUNTIF(OFFSET($F$7,MATCH($E$4,$E$8:$E$17,0),,1,20),"?*"))New Formulas:
=SORT(UNIQUE(Table1[Division])=SORT(FILTER(Table1[App],Table1[Division]=E4))And both lists come out sorted.
Which Excel Versions Support Dynamic Arrays
UNIQUE, FILTER and SORT replaced two long helper formulas with three short ones. And the drop-down lists now grow on their own when you add data to the table.
Once these click, the new Excel functions everyone needs are the natural next step.
They work in Microsoft 365, Excel 2021 and later, and Excel for the web. If you share the file with someone on Excel 2019 or older, they’ll see the last calculated values, but the formulas won’t update.
Download the Dynamic Arrays Practice File
Get the Dynamic Arrays Practice File
Practice the spill range, UNIQUE, FILTER and SORT on the data from the video.
Frequently Asked Questions
How do I create a dependent drop-down list in Excel?
Build the first list with =UNIQUE(Table1[Division]) and point a Data Validation list to it with the # sign, for example =$E$8#. Then use =FILTER(Table1[App], Table1[Division]=E4) to list only the items for the selected category, and point the second drop-down to that spill range.
What does the # sign after a cell reference mean in Excel?
It is the spilled range operator. =E8# refers to the whole spill range that starts in E8, so the reference grows or shrinks when the formula returns more or fewer results.
Can Data Validation use a spill range as the list source?
Yes. In Data Validation, choose List and enter the first cell of the spill range followed by #, for example =$E$8#. The drop-down then updates automatically when the list changes.
Why does UNIQUE return a 0 in my list?
UNIQUE treats an empty cell as a value and shows it as 0. Use an Excel Table as the source so the range only covers filled rows, or wrap the range in FILTER to remove empty cells first.
Why does my dynamic array formula show a #SPILL! error?
Something is blocking the spill range, usually a value in one of the cells the result needs. Clear those cells. Spill formulas also do not work inside an Excel Table, so place them in the grid next to the table.
Which Excel versions have dynamic arrays?
Microsoft 365, Excel 2021 and later, and Excel for the web. Excel 2019 and older do not have UNIQUE, FILTER, SORT or the # spill reference.
Leila Gharani
Founder of XelPlus and ten-time Microsoft MVP. Leila helps over 500,000 professionals master Excel, Power BI, and data automation through practical, real-world training.








