# COLUMN function

COLUMN returns the column number of a cell reference.

If the reference is a cell, the column number of the cell is returned. If the parameter is a cell area and the formula is entered as an array formula, the corresponding column numbers are returned in a single-row array. If the COLUMN function with an area reference parameter is not used for an array formula, only the column number of the first cell within the area is returned.

## Syntax

COLUMN(`reference`)

`reference` is
the reference to a cell or cell area whose first column number is
to be found.

If no reference is entered, the column number of the cell in which the formula is entered is found. The reference to the current cell is set automatically.

## Example

`=COLUMN(A1)` returns `1`.
Column A is the first column in the table.

`=COLUMN(C3:E3)` returns `3`.
Column C is the third column in the table.

`=COLUMN(D3:G10)` returns `4` because
column D is the fourth column in the table and the COLUMN function
is not used as an array formula. In this case, the first value of
the array is always used as the result.

`{=COLUMN(B2:B7)}` and `=COLUMN(B2:B7)` both
return `2` because the reference contains
only column B as the second column in the table. Because single-column
areas have only one column number, it does not make a difference whether
the formula is used as an array formula.

`=COLUMN()` returns `3` if
the formula was entered in column C.

`{=COLUMN(Rabbit)}` returns
the single-row array (3, 4) if the area (C1:D3) is named `Rabbit`.