KzRKA‖CHOOSECOLS function

Contents
RmBsq‖

# pgEyS‖CHOOSECOLS

qxKzH‖Returns the specified columns from an array.

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

### ebLBc‖Syntax

JgtE5‖=CHOOSECOLS(Array; Column_1 [; Column_2 [; Column_3 [; ...]]])

cvwYJ‖Array: The array containing the columns to be returned in a new array.

weToH‖Column_1: The index of the first column to be returned. A negative value chooses from the end of the array.

gUFeT‖Column_2; Column_3; ...: (optional) The list of other column indexes to be returned. A negative value chooses from the end of the array.

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

### GAZG2‖Examples

KAvDE‖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

uiDSY‖The formula {=CHOOSECOLS(A1:E3;2;4;5)} returns the array below with columns 2,4 and 5 chosen.

BBB | DDD | EEE
| III | JJJ
LLL | NNN | OOO

MdDNC‖The formula =CHOOSECOLS(A1:E3;1;-1) returns the array below with column 1 and column 5 chosen, note that column 5 is chosen from the end of the array.

AAA | EEE
FFF | JJJ
KKK | OOO

74pDf‖Use the function CHOOSECOLS to reorder the columns of an array. You can also replicate columns by repeating the column index.

#### XAFa7‖Technical information

QgTYx‖This function is available since LibreOffice 25.8.

2C7vt‖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.CHOOSECOLS

Related Topics

TOCOL

TOROW

WRAPCOLS

WRAPROWS

CHOOSEROWS

VSTACK

HSTACK

EXPAND

DROP

TAKE

d8LnJ‖CHOOSECOLS wiki page.

Please support us!