目次

# SORT

範囲または配列の内容を並べ替えます。

Enter the formula as an array formula.

### 構文

SORT(範囲 [; 並べ替えインデックス [; 並べ替え順序 [; 列の比較] ] ])

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 | 製品名 | Sales | Revenue
2 | 鉛筆 | 20 | 65
3 | pen | 35 | 85
4 | ノート | 20 | 190
5 | 本 | 17 | 180
6 | 筆箱 | not | not

#### 昇順の例

{=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
pen | 35 | 85
筆箱 | not | not

#### 降順の例

{=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
pen | 35 | 85
鉛筆 | 20 | 65

#### Technical information

この関数は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

関連項目

SORT wikiページ。

SORTBY