How to Sort Excel Data Blocked by a Dynamic Array
Question details
The user needs to sort Excel data when the selected range contains a spilled dynamic array.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A user wants to sort data produced by a dynamic-array formula such as FILTER or UNIQUE.
- Observed behavior
- Excel may prevent sorting because the selected range contains cells belonging to a spilled array.
Click a cell in the affected range and check the formula bar for a FILTER, UNIQUE, or other array formula. Identify the formula's source range and the cell where the formula was entered before changing the sort order.
Wrap the Dynamic-Array Formula in SORT
Use SORT to order the spilled results while keeping them linked to the source data.
Click the top-left cell of the spilled range, where the dynamic-array formula was entered.
In the formula bar, wrap the existing formula in SORT. For example, use =SORT(FILTER(A2:C100,C2:C100="Active"),1,1) to filter active rows and sort them by the first column in ascending order.
Press Enter and check that the results spill into the expected cells in the new order.

Sort the Source Data Instead of the Spilled Results
Use this approach when the desired output order follows the order of the source data.
Check for a Legacy Array Formula
Use this check if the affected cells belong to a legacy array rather than a dynamic spill.
Work with Spreadsheet Data in WPS Office
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and Microsoft Office format compatibility for an easier move between apps. It does not change how Excel handles spilled arrays.

Frequently Asked Questions
Why can't I sort part of a spilled array in Excel?
A spilled range is controlled by one formula, so its individual result cells cannot be rearranged independently. Select the formula cell and wrap its formula in SORT to order the output.
How do I sort FILTER results by a specific column?
In the formula bar, use SORT around FILTER and specify the column index and order. For example, =SORT(FILTER(A2:C100,C2:C100="Active"),2,1) sorts the filtered results by their second column in ascending order.
Will sorting the source data always sort the spilled results?
Not necessarily. Sort the complete source table using Data > Sort, then check the output. The result order depends on the dynamic-array formula.
How can I select an entire legacy array in Excel?
In desktop Excel, click a cell in the array, then choose Home > Find & Select > Go To Special > Current array. Select the whole array before editing or deleting it.




