Advanced
Lookup & Reference
SORT
Returns a range sorted by a column you specify, automatically spilling the sorted results into neighboring cells.
Compatibility: Microsoft 365, Excel 2021+
Syntax
=SORT(array, [sort_index], [sort_order], [by_col])
Example
=SORT(A2:C20,3,-1)
When to Use It
Use SORT to build a live, formula-driven sorted view of your data — unlike a manual sort, it re-sorts automatically whenever the underlying data changes.