CHOOSEROWS function

Turinys

# CHOOSEROWS

Returns the specified rows from an array.

Enter the formula as an array formula. Hint: enter formula using keys Ctrl + Shift + Enter.

### Sintaksė

=CHOOSEROWS(Array; Row_1 [; Row_2 [; Row_3 [; ...]]])

Array: The array containing the rows to be returned in a new array.

Row_1: The index of the first row to be returned. A negative value chooses from the end of the array.

Row_2; Row_3; ...: (optional) The list of other row indexes to be returned. A negative value chooses from the end of the array.

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

### Pavyzdžiai

Consider the array A1:E3 below:

| A | B | C | D | E
--- | --- | --- | --- | --- | ---
1 | AAA | BBB | CCC | DDD | EEE
2 | FFF |  |  | III | JJJ
3 | KKK | LLL | MMM | NNN | OOO

The formula {=CHOOSEROWS(A1:E3;2;3)} returns the array below with rows 2 and 3 chosen.

FFF |  |  | III | JJJ
KKK | LLL | MMM | NNN | OOO

The formula =CHOOSEROWS(A1:E3;1;-1) returns the array below with row 1 and row 3 chosen, note that row 3 is chosen from the end of the array.

AAA | BBB | CCC | DDD | EEE
KKK | LLL | MMM | NNN | OOO

Use the function CHOOSEROWS to reorder the rows of an array. You can also replicate rows by repeating the row index.

#### Technical information

This function is available since LibreOffice 25.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.CHOOSEROWS

Susijusios temos

TOCOL

TOROW

WRAPCOLS

WRAPROWS

CHOOSECOLS

VSTACK

HSTACK

EXPAND

DROP

TAKE

CHOOSEROWS wiki page.

Paremkite mus!