CHOOSECOLS function

Contido

# CHOOSECOLS

Returns the specified columns from an array.

Introduza a fórmula como fórmula de matriz. Suxestión: Introduza a fórmula empregando as teclas Ctrl + Maiús + Intro.

### Sintaxe

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

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

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

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

None of the value of Column_1; Column_2; ... can be zero.

The absolute value of each of Column_1; Column_2; ... must be less than or equal to the number of columns of Array.

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

### Exemplos

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 {=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

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

CHOOSECOLS(Array; Columnn) is equivalent to INDEX(Array; ; Columnn).

#### Información técnica

Esta función está dispoñíbel desde a versión 25.8 do LibreOffice.

Esta función NON é parte do estándar Formato Open Document para Aplicacións de Ofimática (OpenDocument), versión 1.3. Parte 4: Fórmula recalculada (OpenFormula). O espazo de nomes é

COM.MICROSOFT.CHOOSECOLS

Temas relacionados

ÍNDICE

TOCOL

TOROW

WRAPCOLS

WRAPROWS

CHOOSEROWS

VSTACK

HSTACK

EXPANDIR

DESCARTAR

TAKE

CHOOSECOLS wiki page.

Precisamos da súa axuda!