SORT in Apple Numbers
SORT(array, sort-index, sort-order, sort-by)Explanation
SORT sorts a range. With no further arguments it sorts by the first column, ascending. Use the third argument for direction: 1 is ascending, -1 is descending. The result is a new array; the original cells stay unchanged.
Syntax
SORT(array, sort-index, sort-order, sort-by)Example
Sort the product names in A2:A5 alphabetically and join them with a comma and a space between them.
| A | B | C | |
|---|---|---|---|
| 1 | Product | Price | Qty |
| 2 | Apple | 4 | 10 |
| 3 | Pear | 6 | 5 |
| 4 | Kiwi | 12 | 2 |
| 5 | Grape | 8 | 3 |
Formula: =TEXTJOIN(", ",TRUE,SORT(A2:A5))
Result: Apple, Grape, Kiwi, Pear
Frequently asked questions
What does SORT do in Apple Numbers?
SORT sorts a range. With no further arguments it sorts by the first column, ascending. Use the third argument for direction: 1 is ascending, -1 is descending. The result is a new array; the original cells stay unchanged.
What is the syntax of SORT?
The syntax is SORT(array, sort-index, sort-order, sort-by).
More in this category
Read more
- FILTER in Numbers: Keep Only the Rows You Need
- SORT, SORTBY and UNIQUE in Numbers: Sort and Deduplicate
Practise it yourself
Type the formula yourself in a real exercise and see right away if your answer is correct. The first exercises are free.
Start practising