How to sort dynamic array in Excel
Display a leaderboard sorted by score, show a product list alphabetically, or output a FILTER result in sorted order.
Step-by-step instructions
How to sort dynamic array — 3 steps
Enter the range or array you want to sort as the first argument.
Enter the column index to sort by as the second argument — 1 for the first column, 2 for the second, and so on.
Enter 1 for ascending or -1 for descending order as the third argument.
Example data
Worked example
| Name | Score |
|---|---|
| Alice | 92 |
| Bob | 87 |
| Carol | 95 |
| David | 78 |
Common mistakes
Errors to watch out for
SORT is not available
SORT requires Excel 365 or Excel 2021. Use the Data > Sort menu for static sorting in older versions.
Sorted output does not update
SORT is dynamic — it updates whenever the source data changes. If it appears static, check that calculation is set to Automatic in Formulas > Calculation Options.
FAQ
Frequently asked questions
How do I sort by multiple columns?
Use arrays for the sort index and order — =SORT(A2:C20,{2,3},{1,-1}) sorts by column 2 ascending first, then column 3 descending for ties.
Describe your exact spreadsheet problem — get the formula in seconds.
Open AI Formula Generator — FreeRelated how-to guides