FP

FormulaPilot

Spreadsheet formula tools

Open generator
Excel how-to guide

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.

beginnerArray FormulasSORT reference

Step-by-step instructions

How to sort dynamic array3 steps

1

Enter the range or array you want to sort as the first argument.

2

Enter the column index to sort by as the second argument — 1 for the first column, 2 for the second, and so on.

3

Enter 1 for ascending or -1 for descending order as the third argument.

Example data

Worked example

NameScore
Alice92
Bob87
Carol95
David78

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.

Need a custom variation?

Describe your exact spreadsheet problem — get the formula in seconds.

Open AI Formula Generator — Free

Related how-to guides

Continue learning.