Home › Functions › Lookup & Reference › SORT
fx
SORT
Lookup & Reference  ·  Since: Microsoft 365  ·  9 languages

The SORT function sorts the contents of a range or array.

🌐 Translations

English SORT
Deutsch SORTIEREN
Français TRIER
Español ORDENAR
Italiano SORT
Português CLASSIFICAR
Nederlands SORTEREN
Polski SORT
Русский СОРТ

📦 Availability

Excel versionAvailable
Excel 2007 ✗
Excel 2013 ✗
Excel 2019 ✗
Excel 2021 ✗
Microsoft 365 ✓
Translate a formula with this function
fx EN
fx DE

⌨ Syntax

SORT(array,[sort_index],[sort_order],[by_col])

Arguments

array (required) — The range, or array to sort
sort_index (optional) — A number indicating the row or column to sort by
sort_order (optional) — A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order
by_col (optional) — A logical value indicating the desired sort direction; FALSE to sort by row (default), TRUE to sort by column

▶ Examples

=SORT(A2:A17)
=SORT(array,[sort_index],[sort_order],[by_col])

Related functions

Copied to clipboard