SORT

Sorts the contents of a range or array.

note

Enter the formula as an array formula.


Sintaxia

SORT(Range [; SortIndex [; SortOrder [; ByCol] ] ])

Range: the range or array to sort.

SortIndex: (optional). The number indicating the row or column to sort by.

SortOrder: (optional). A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order.

ByCol: (optional). A logical value indicating the desired sort direction; FALSE to sort by row (default), TRUE to sort by column.

note

Any of the optional arguments can be omitted. An optional argument requires all preceding separators to be present.


Adibideak

Begiratu honako taula

A

B

C

1

Produktuaren izena

Sales

Revenue

2

arkatza

20

65

3

luma

35

85

4

koadernoa

20

190

5

liburua

17

180

6

arkatz-kutxa

not

not


Example with ascending order

{=SORT(A2:C6;2;1)}

Sort the range A2:C6 based on the second column in ascending order (Sales).

liburua

17

180

arkatza

20

65

koadernoa

20

190

pen

35

85

arkatz-kutxa

not

not


Example with descending order

{=SORT(A2:C6;3;-1)}

Sort the range A2:C6 based on the third column in descending order (Revenue).

arkatz-kutxa

not

not

koadernoa

20

190

liburua

17

180

pen

35

85

arkatza

20

65


Informazio teknikoa

tip

This function is available since LibreOffice 24.8.


Funtzio hau ez dago Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format estandarrean. Izen-espazioa honakoa da:

COM.MICROSOFT.SORT

Emaguzu laguntza!