Sorts a given array or range of values based on the specified criteria. It is a dynamic array function, where the result array may increase or decrease in size based on the source range.
Syntax
range: The range containing the array of values to sort. Eg., A2:B11
sort_by: Number indicating the row or column to sort the range by. Eg., 1
order: Indicates the order in which the range should be sorted.
If 1, the range is sorted in ascending order
If -1, the range is sorted in descending order
direction: Logical expression that specifies direction of sort. Defaults to FALSE if omitted.
If TRUE, sorts by column
Examples
|
Formula |
|
=SORT(A2:B11;1;1) |
Possible Errors
|
Errors |
Meaning |
|
#N/A! |
|
|
#NAME! |
|
|
#VALUE! |
|
|
#REF! |
|
Similar Functions