SORT
Sorts the contents of a range or array
Syntax
SORT(array, [sort_index], [sort_order], [by_col])
Parameters
- array: Required. The range or array to sort
- sort_index: Optional. A number indicating the row or column to sort by (default 1)
- sort_order: Optional. 1 for ascending (default), -1 for descending
- by_col: Optional. FALSE to sort by row (default), TRUE to sort by column
Example
=SORT(A1:B10, 2, -1)