
Dynamic ArrayLevel: ExpertAvailable in: Excel 365 / 2021+
In this article
- Syntax
- Examples
- Example 1
- Example 2
- Power combo
- Related functions
SORT returns a sorted copy of a range; the original stays untouched and the result re-sorts as data changes.
Syntax
=SORT(array, [sort_index], [sort_order], [by_col])
| Argument |
What it means |
sort_index |
Which column to sort by (1 = first). |
sort_order |
1 ascending, −1 descending. |
Examples
Example 1
=SORT(A2:E500, 5, -1)
By amount, largest first.
Example 2
=SORT(A2:E500, {2,5}, {1,-1})
By region A–Z, then amount high–low.
Power combo
=TAKE(SORT(A2:E500, 5, -1), 10)
Top 10 rows (TAKE needs the 2022 update).
SORTBY · FILTER · UNIQUE · TAKE
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong