Numbers Exercises

SORTBY in Apple Numbers

Last updated:

Short answer: SORTBY sorts a range by the values in another range. Syntax: SORTBY(array, sort-by-array, sort-order, …)

Explanation

SORTBY sorts a range by the values in another range. That way you can sort names by price without having to show the prices themselves.

Syntax

SORTBY(array, sort-by-array, sort-order, …)

Example

Sort the product names (A2:A5) by price (B2:B5), low to high, and join them with a comma and a space.

Table 1
ABC
1ProductPriceQty
2Apple410
3Pear65
4Kiwi122
5Grape83

Formula: =TEXTJOIN(", ",TRUE,SORTBY(A2:A5,B2:B5))
Result: Apple, Pear, Grape, Kiwi

Frequently asked questions

What does SORTBY do in Apple Numbers?

SORTBY sorts a range by the values in another range. That way you can sort names by price without having to show the prices themselves.

What is the syntax of SORTBY?

The syntax is SORTBY(array, sort-by-array, sort-order, …).

More in this category

Read more

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