SORT

Sorts the contents of a range or array.

แƒจแƒ”แƒœแƒ˜แƒจแƒ•แƒœแƒ˜แƒก แƒฎแƒแƒขแƒฃแƒšแƒ

Enter the formula as an array formula.


แƒกแƒ˜แƒœแƒขแƒแƒฅแƒกแƒ˜

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.

แƒจแƒ”แƒœแƒ˜แƒจแƒ•แƒœแƒ˜แƒก แƒฎแƒแƒขแƒฃแƒšแƒ

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


แƒ›แƒแƒ’แƒแƒšแƒ˜แƒ—แƒ”แƒ‘แƒ˜

Consider the following table

A

B

C

1

Product Name

Sales

Revenue

2

แƒคแƒแƒœแƒฅแƒแƒ แƒ˜

20

65

3

แƒ™แƒแƒšแƒแƒ›แƒ˜

35

85

4

แƒ แƒ•แƒ”แƒฃแƒšแƒ˜

20

190

5

แƒฌแƒ˜แƒ’แƒœแƒ˜

17

180

6

แƒžแƒ”แƒœแƒแƒšแƒ˜

แƒแƒ 

แƒแƒ 


Example with ascending order

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

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

แƒฌแƒ˜แƒ’แƒœแƒ˜

17

180

แƒคแƒแƒœแƒฅแƒแƒ แƒ˜

20

65

แƒ แƒ•แƒ”แƒฃแƒšแƒ˜

20

190

แƒ™แƒแƒšแƒแƒ›แƒ˜

35

85

แƒžแƒ”แƒœแƒแƒšแƒ˜

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).

แƒžแƒ”แƒœแƒแƒšแƒ˜

not

not

แƒ แƒ•แƒ”แƒฃแƒšแƒ˜

20

190

แƒฌแƒ˜แƒ’แƒœแƒ˜

17

180

แƒ™แƒแƒšแƒแƒ›แƒ˜

35

85

แƒคแƒแƒœแƒฅแƒแƒ แƒ˜

20

65


Technical information

แƒ แƒฉแƒ”แƒ•แƒ˜แƒก แƒฎแƒแƒขแƒฃแƒšแƒ

This function is available since LibreOffice 24.8.


This function is NOT part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.SORT

Please support us!

Please support us!