SORT

The SORT function sorts an array.

SORT(array, sort-index, sort-order, sort-by)

array: The array to sort.

sort-index: A number to indicate the row or column to sort by.

sort-order: An indicator for desired sort order.

sort ascending (1 or omitted): Sort in ascending order. This is the default selection.

sort descending (-1): Sort in descending order.

sort-by: A Boolean value of either TRUE or FALSE.

sort rows (FALSE or omitted): Sort by row. This is the default selection.

sort columns (TRUE): Sort by column.

Notes

Examples

Given the following data in cells A1:C11:

Sales Rep

Genre

Units

Amanda

Fiction

21

Brandon

Fiction

23

Sofia

Non-Fiction

49

Julian

Comic

22

Gregory

Non-Fiction

32

Julian

Comic

55

Julian

Comic

44

Sofia

Fiction

31

Amanda

Comic

20

Gregory

Non-Fiction

55

=SORT(A2:C11, 3, 1,FALSE) returns the array sorted from least units sold to most units sold. See below:

Amanda

Comic

20

Amanda

Fiction

21

Julian

Comic

22

Brandon

Fiction

23

Sofia

Fiction

31

Gregory

Non-Fiction

32

Julian

Comic

44

Sofia

Non-Fiction

49

Julian

Comic

55

Gregory

Non-Fiction

55

=SORT(A2:C11) returns the array sorted in alphabetical order. See below:

Amanda

Fiction

21

Amanda

Comic

20

Brandon

Fiction

23

Gregory

Non-Fiction

32

Gregory

Non-Fiction

55

Julian

Comic

22

Julian

Comic

55

Julian

Comic

44

Sofia

Non-Fiction

49

Sofia

Fiction

31

See alsoFILTERSORTBY
Morty Proxy This is a proxified and sanitized view of the page, visit original site.
उपयुक्त आहे का?
कॅरॅक्टर मर्यादा : 250
कमाल कॅरॅक्टर मर्यादा 250 आहे.
तुमच्या प्रतिक्रियेबद्दल धन्यवाद.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.