deepcalc
DocsSORT

SORT

Sorts the contents of a range or array.

  • Excel: Verified match
  • Google Sheets: Verified match
  • Returns: Array

Examples

=SORT(A1:A5)
A
1 10
2 20
3 30
4 40
5 50
Result 10

Syntax

SORT(array, [sort_index], [sort_order], [by_col])
array
range required
sort_index
number optional defaults to 1
sort_order
number optional defaults to 1
by_col
boolean optional defaults to 0

Errors

#ERROR!
=SORT()
#VALUE!
=SORT(A1:A2,1,2)