SORT Function. Sort range of cells.(Microsoft Excel)
The SORT 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
=SORT(array,sort_index,sort_order,by_col)
Name | Omission | Explanation |
---|---|---|
array | Required argument. Cell range to sort. | |
sort_index | 1 | Specify the column or row to be sorted by a number with the first digit as 1. |
sort_order | 1 | Sort order. 1…ascending order -1…Descending order |
by_col | FALSE | Sort direction. Column (horizontal) direction Row (vertical) direction |
Demonstrate
Argument 1: array
When the SORT function is entered, the result is displayed with the cell range specified in argument 1 sorted.
The function will automatically expand to cells other than the cell where the formula was entered, but these cells are called ghost cells and are not editable. If only argument 1 is specified, the cells are sorted in ascending order by the first column.
Argument 2: sort_index
Argument 2 specifies the column or row on which to base the sorting by a numerical value, with the first row as 1.
If omitted, it is set to 1.
Argument 3: sort_order
Specify 1 for argument 3 for ascending order, -1 for descending order.
If omitted 1.
Argument 4: by_col
If FALSE is specified for argument 4, the rows are sorted vertically; if TRUE, the columns are sorted horizontally. TRUE is specified for sorting in the column direction.
Comparison with other functions
SORTBY Function
The differences from the SORTBY 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. |
Combination with other functions.
FILTER function.
The results of the FILTER function can be reordered by specifying the result of the SORT function as argument 1.
VSTACK and HSTACK functions.
The VSTACK and HSTACK functions allow multiple cell ranges to be arguments to the SORT function.
---
Discussion
New Comments
No comments yet. Be the first one!