Lookup and referenceExcel 2021

SORT

Reorder an array by a chosen row or column.

Syntax

=SORT(array, [sort_index], [sort_order], [by_col])

Worked example

Sort a vertical array in ascending order.

=SORT({6;2;9})

Result 2; 6; 9 (three rows)

Microsoft documentation

Check the arguments, supported editions and behavior of this function in Microsoft’s reference.

Microsoft reference

Search ExcelTutor