> For the complete documentation index, see [llms.txt](https://docs.nedyx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nedyx.com/nedyx/clearlines-functions/range-functions/columns.md).

# COLUMNS

#### Syntax

**COLUMNS**(*range*; *columnIndex1*; *columnIndex2*; …; *columnIndexN*)

* *range* - the range from which the columns should be extracted *- **Value type**: range*
* *columnIndex1-N* - the indicees of the columns which should be included in the return range - ***Value type**: number*

#### Remarks

* The order of the columns in the return range is the same as the order of the *columnIndex* parameters.
* If a column does not exist in *range*, a column with empty cells is included in the range.
* It is possible to use the same index multiple times, then the same column is included multiple times in the result range.

#### Examples

The left table is filled with the columns 1 and 3 of table1.

<figure><img src="/files/JGQILAWuBY2hBX6n4QaZ" alt=""><figcaption></figcaption></figure>

The left table is filled with several columns of table2 in a custom order. Including an empty column, by using 0 as index.

<figure><img src="/files/HwXzH0Sa2JSOYpQEs9lS" alt=""><figcaption></figcaption></figure>
