Excel Tutorial – SORTBY

The SORTBY function in Microsoft Excel is a function that sorts a range of cells based on the values in one or more columns, and returns the sorted range as an array. This function is useful for sorting and organizing data in Excel.

To use the SORTBY function, follow these steps:

  1. Open Microsoft Excel and select the cell where you want the result to appear.
  2. Type the following formula into the cell: =SORTBY(array, sort_by_array1, [sort_order1], …)
  3. Replace “array” with the cell reference or range of cells that you want to sort.
  4. Replace “sort_by_array1” with the cell reference or range of cells that contain the values that you want to sort by.
  5. Replace “sort_order1” with the number 1 or -1 to specify the sort order:
  • 1: Ascending (A to Z, or smallest to largest)
  • -1: Descending (Z to A, or largest to smallest)
  1. If you want to sort by additional columns, you can add additional “sort_by_array” and “sort_order” arguments to the formula.
  2. Press Enter to see the result.

The SORTBY function sorts the specified array based on the values in the sort_by_array(s), using the specified sort order. It returns the sorted array as a result.

You can use the SORTBY function to sort and organize data in Excel. It is a very useful tool for working with data in Excel.

Leave a Reply