Formula Errors

How to Sort Excel Data Blocked by a Dynamic Array

John WilsonJohn Wilson Dec 2, 2026 868 views

Question details

The user needs to sort Excel data when the selected range contains a spilled dynamic array.

How to Sort Excel Data Blocked by a 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.
Before you start

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.

Solution 1Recommended

Wrap the Dynamic-Array Formula in SORT

Use SORT to order the spilled results while keeping them linked to the source data.

1
Select the formula cell

Click the top-left cell of the spilled range, where the dynamic-array formula was entered.

2
Add SORT to the formula

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.

3
Apply the formula

Press Enter and check that the results spill into the expected cells in the new order.

Wrap the Dynamic-Array Formula in SORT
Sorting UNIQUE results: You can also wrap a UNIQUE formula in SORT, for example, =SORT(UNIQUE(A2:A100)).
Free Microsoft Office alternative

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.

Sort and organize spreadsheet data in WPS SpreadsheetsOpen and work with Microsoft Excel XLSX and XLS filesUse a familiar interface for a smoother transition from Microsoft OfficeWork in a free, lightweight office suite
QA img-9

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.