How to Use Dynamic Array Formulas in Excel Data Validation Lists
Question details
The user wants to use dynamic array functions like SORT as the source for a data validation list but is restricted from entering them directly, and encounters #SPILL! errors when setting up multiple lists.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Creating dynamic, auto-updating dropdown lists using dynamic array functions for data validation.
- Observed behavior
- Excel does not allow dynamic array formulas directly in the data validation source field, and placing dependent formulas in adjacent rows causes overlapping spill ranges resulting in a #SPILL! error.
Ensure your version of the spreadsheet software supports dynamic array functions (such as SORT, UNIQUE, or FILTER) and that you have designated a completely blank area in your worksheet to host the spilled array results.
Reference a Spilled Range in the Data Validation Source
Since dynamic array formulas cannot be typed directly into the Data Validation menu, you must place the formula in a separate cell and reference its spill range.
Functions like SORT or UNIQUE return an array rather than a fixed range. To use these as a dropdown list source, evaluate the formula on the spreadsheet first, then point the data validation tool to the starting cell using the spill operator (#).
Select a blank cell (e.g., D2) and type your dynamic array formula, such as =SORT(A2:A10). Press Enter, and the results will automatically spill downwards.
Select the cell where you want your dropdown list to appear. Go to the Data tab on the ribbon and click on Data Validation.
In the Data Validation dialog box under the Settings tab, select 'List' from the Allow dropdown menu.
In the Source box, type an equals sign, the cell reference containing your formula, and the spill operator (e.g., =D2#). Click OK to apply.

Prevent #SPILL! Errors with Multiple Dependent Lists
Rearrange your dependent dynamic array formulas horizontally to prevent their spill ranges from overlapping and triggering errors.
Use Dynamic Array Formulas Seamlessly in WPS Spreadsheet
WPS Spreadsheet offers robust support for dynamic array functions like SORT, UNIQUE, and FILTER. You can easily reference spill ranges in data validation lists to create dynamic, auto-updating dropdowns without performance lag.
- 1. Calculate the array: Enter your array function like =SORT(A2:A20) in an empty cell to generate the spill range.
- 2. Open Data Validation: Select your target input cell and navigate to Data > Data Validation in the top ribbon.
- 3. Link the spill reference: Choose 'List' as your criteria and input your spill range reference (e.g., =$C$2#) into the source box.

Frequently Asked Questions
Why do I get a #SPILL! error when creating dependent lists?
A #SPILL! error occurs when a dynamic array formula needs to expand, but there is existing data or another formula blocking its path. To fix this, ensure you leave enough empty cells below the formula, or arrange multiple dependent formulas horizontally across columns.
Can I type a dynamic array formula directly into the Data Validation Source box?
No, Excel currently requires the dynamic array formula to be evaluated in a worksheet cell first. You cannot type functions like SORT or UNIQUE directly into the validation source box; you must generate the array on the sheet and reference the spilled cell.
What does the hashtag (#) do in my Excel formula?
The hashtag (#) is the spilled range operator. Appending it to a cell reference (like A1#) tells the software to reference the entire dynamic array originating from that specific cell, ensuring your selection dynamically captures all data regardless of how much it expands or contracts.




