# CHOOSECOLS

## Content

The function returns the specified columns from an array.

## Syntax

`=CHOOSECOLS(array,col\_num1,[col\_num2],…)`

## Arguments

The function provides the following arguments:

| Argument | Description |
| -------- | ----------- |
| *array* | Refers to the array containing the rows to be returned. |
| *col\_num1* | Refers to the first column to be returned. Required. |
| *[col\_num2]* | [Optional] Refers to the additional columns to be returned. |

## Remarks

The function returns a #VALUE error if the absolute value of any of the col\_num arguments is zero or exceeds the number of columns in the array.

## Data Types

The function returns an array, <span style="color: rgb(23, 43, 77); font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: -0.08px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre-wrap; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">the type of each value in the array depends on the parameter.</span>

## Examples

![choosecols-snapshot.png](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/8d606653-16a0-474d-b9dc-e2b4d01c2446/choosecols-snapshot.41a3f5.png)