SORTBY Function. Sort range of cells.(Microsoft Excel)
The SORTBY function is a Spill related function implemented in 2019.
It is a function to sort a given list in the order of specific columns.
It works similarly to sorting data.
How it works
=SORTBY(array, by_array1, sort_order1, ...)
Name | Omission | Explanation |
---|---|---|
array | Required argument. Cell range to sort. | |
by_array1 | Specify a cell range of columns on which to base the sorting. The number of optional, but one is required. | |
sort_order1 | 1 | Sort Order. 1: ascending order. -1: descending order. |
Demonstrate
When you enter a formula, the sorted result of the array is displayed.
The result of the sorting will be displayed.
The function will automatically expand to cells other than the cell where the formula was entered, but cells other than the cell with the formula are ghost cells and cannot be edited.
The formula below is a formula to sort in ascending order by Type in column C and in descending order by Quantity in column D.
=SORTBY(B3:D8,C3:C8,1,D3:D8,-1)

Comparison with other functions
SORT Function
The differences from the SORT function added at the same time are shown in the table below.
Comparison | SORT | SORTBY |
---|---|---|
Sorting criteria | 1 column only. | Multiple columns. |
Specify columns | Numerics. | Cell range. |
Sort direction | Row or column. | Row only. |
Discussion
New Comments
No comments yet. Be the first one!