SORT
Sorts the contents of a range or array.
Lookup & ReferenceDynamic Arrays & LAMBDALookup & Matching EssentialsModern Excel Functions
What it does
Sorts the contents of a range or array (dynamic array).
Syntax
SORT(array, [sort_index], [sort_order], [by_col])
Arguments
array(range|array) β Range to sort.
Examples
Sort ascending
Sort values in A2:A6 ascending.
FORMULA
=SORT(A2:A6)
RESULT
[spills]
SAMPLE DATA
| A | |
|---|---|
| 1 | Value |
| 2 | 30 |
| 3 | 10 |
| 4 | 50 |
| 5 | 20 |
| 6 | 40 |