Lookup

SORT

Definition

SORT returns the values of a range put in order.

Syntax

=SORT(array)

Arguments

Argument Meaning
array The cells to order, such as A2:A4.

Worked example

A mill lists three batch sizes that need to be read in ascending order. Sizes are in A2:A4.

A: Size
4
1
9

Formula: =INDEX(SORT(A2:A4),1)

Result: 1. Sorted, the sizes are 1, 4, and 9, and INDEX takes the first so the cell stays a single value.

Practice

Cells A2:A4 hold 9, 2, and 5. In B2, write a formula that returns the first value after sorting that range.

  1. In B2, write an INDEX and SORT formula that returns the first value of A2:A4 sorted ascending.
Step 1 of 2
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…

Related functions

INDEX picks one cell from the sorted list. INDIRECT can feed SORT a range whose address is stored as text.

Common mistake

Leaving SORT to spill when the checker reads one cell: wrap INDEX around SORT so B2 holds a single value.

Related functions

These links are related functions.