SORT function for Sheets

1 min read
I. Intro
The SORT function sorts the elements of the specified range in ascending order (default) or descending order.
II. Explanation
  • Formula: =SORT(array, [sort_index], [sort_order], [by_col])
  • Parameters:
  • Array (required): An array or range containing the data you want to sort.
  • Sort_index (optional): A number that indicates which row or column to sort by.
  • Sort_order (optional): A number that indicates the required sorting order; 1 represents ascending (default) and -1 represents descending order.
  • By_col (optional): A logical value that indicates the required sorting direction; FALSE represents sorting by row (default) and TRUE represents sorting by column.
  • Example: =SORT (A2:A17)
III. Steps
Use the SORT function
  1. Select a cell and click Formulas on the toolbar, then select Data Reference > SORT. You can also directly enter =SORT in a cell.
  1. Enter the parameters into the cell. For example: =SORT(A1:A10).
  1. Press Enter to display the result.
250px|700px|reset
5.gif
Delete the SORT function
Select the cell with the SORT function and press Delete.
IV. Use case
Sales: Sort sales figures
You can use the SORT function to see the sales figures in ascending order for product analysis.
  • Formula used below: =SORT(C2:C8)
  • About the parameters: Simply select the range that requires sorting (C2:C8).
250px|700px|reset
6.gif
Written by: Lark Help Center
Updated on 2022-10-08
How satisfied are you with this content?
Thank you for your feedback!
Need more help? Please contact Support.
0
rangeDom