Calc SORT function

The SORT function is used to organize the elements of a range or array in a specific order, either ascending or descending.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.


Description

The SORT function sorts a list alphabetically


Syntax

SORT(value1, value2, [value3], ...)
The SORT function syntax has the following arguments:

  • value1 Required. A text value
  • value2 Required. A text value
  • value3 Optional. A text value

Example

FormulaDescriptionResult
=SORT("e", "f", "a", "c", "d", "b")Sort the values "e", "f", "a", "c", "d", "b" alphabetically.a, b, c, d, e, f
=SORT(9, 7, 4)Sort the values 9, 7, 4 alphabetically4, 7, 9

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.