SORT
FUNCTION
SORT FUNCTION
The SORT function in Excel is a
dynamic array function that
allows you to sort data in a
range or array by specific
criteria. It was introduced in
Excel 365 and Excel 2021.
=SORT(array, [sort_index],
[sort_order], [by_col])
•Array (Required): The range or array of data you want to sort.
•Sort_index (Optional): The column or row number in the array to sort by.Default: 1 (sorts by the first column or row).
•Sort_order (Optional): The order of sorting. [1: Ascending (default).], [ -1: Descending.]
•By_col (Optional): Logical value to indicate whether to sort by columns or rows. [FALSE or omitted: Sort by rows.], [TRUE: Sort by
columns.]