ExcelExcel 2021+
SORT function in Excel
Sorts the contents of a range or array
=SORT(array, [sort_index], [sort_order], [by_col])SORT syntax and parameters
Four arguments, one required.
- arrayarrayRequired
The range, or array to sort
- sort_indexnumberOptional
A number indicating the row or column to sort by
- sort_ordernumberOptional
A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order
- by_colbooleanOptional
A logical value indicating the desired sort direction; FALSE to sort by row (default), TRUE to sort by column
SORT examples
Formulas you'll actually reuse.
Whole table by its third column, biggest deals first (-1 = descending):
=SORT(A2:C200, 3, -1)Filter then sort — the spilled result stays live as data changes:
=SORT(FILTER(A2:C200, C2:C200 > 1000), 3, -1)
SORT in Google Sheets
Same name — your formula ports as-is.
Try SORT in the playground
Edit the example — nothing to install.
Preloaded with the SORT formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- ADDRESSReturns a reference as text to a single cell in a worksheetLookupGoogle Sheets
- AREASReturns the number of areas in a referenceLookupNo Google Sheets equivalent
- CHOOSEChooses a value from a list of valuesLookupGoogle Sheets
- CHOOSECOLSReturns the specified columns from an arrayLookupGoogle Sheets
- CHOOSEROWSReturns the specified rows from an arrayLookupGoogle Sheets
- COLUMNReturns the column number of a referenceLookupGoogle Sheets