The Excel SORT Function helps to sort your data on one column or multiple columns. You can sort in ascending or descending order. In MS-Excel this function is categorized under the Lookup&Reference function.
Purpose of Excel SORT Function
This functions helps to sort a table or a data based on column and order specified.
This function returns the sorted contents of a range or array. The returned array is the same shape as the provided array argument.
|array||The range, or array to sort.||Mandatory|
|[sort_index]||A number indicating the row or column to sort by.||Optional|
|[sort_order]||A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order.||Optional|
|[by_col]||A logical value indicating the desired sort direction; FALSE to sort by row (default), TRUE to sort by column.||Optional|
- Where sort_index is not provided, row1/col1 will be presumed.
- Where an order is not provided, ascending order will be presumed. By default, Excel will sort by row, and will only sort by the column where by_col is TRUE.
- When by_col is FALSE or missing Excel will sort by row.
- Excel has limited support for dynamic arrays between workbooks, and this scenario is only supported when both workbooks are open.
- If you close the source workbook, any linked dynamic array formulas will return a #REF! error when they are refreshed.
Since 2019 for Windows.
Available for Microsoft 365.