# Documentation/How Tos/Calc: COLUMN function

From Apache OpenOffice Wiki

## Contents

## COLUMN

Returns the column number(s), given a reference.

### Syntax:

**COLUMN(reference)**

- returns the column number of
, where**reference**is a reference to a cell.**reference**

- If
is omitted, the column number of the current cell (containing the formula) is returned.**reference**

- If
is a range of cells**reference**__and__the formula is entered as an array formula (by pressing**Ctrl-Shift Enter**rather than**Enter**) a single row array of column numbers is returned.

### Example:

**COLUMN(B3)**

- returns
. Cell B3 is in the second column (column B).**2**

**COLUMN()**

- if entered in cell C7, returns
. Cell C7 is in the third column.**3**

` COLUMN(D2:F3)` (entered with the

**Enter**key)

- returns
. This is**4**__not__an array formula, so the column number of the first cell D2 is returned.

` COLUMN(D2:F3)` (entered with

**Ctrl-Shift-Enter**)

- returns the single row array
, as this**{4; 5; 6}**__is__an array formula. If this formula is entered in cell A1, A1 will display, B1**4**and C1**5**.**6**

**See Also**