COLUMN

Return the column number of a reference (A is 1, B is 2), or of the cell the formula is in.

Syntax

COLUMN([reference])
Argument Required Description
reference Optional A cell or range. Omit it for the formula's own column.

Examples

Every example below was executed against VisiGrid engine 0.51.0 — not transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.

Formula Result Notes
=COLUMN(D1) 4 D is the fourth column.
=COLUMN(B2:D2) 2 For a range, the first column.
=COLUMN()>0 TRUE

A column index that follows the formula

The third argument of VLOOKUP and INDEX is a column number, and a typed number does not change when columns are inserted. Deriving it from a reference does:

=COLUMN(D1)-COLUMN(A1)+1  → 4

— the position of column D within a table starting at A, which stays right if a column is added in between.

Counting across

Filled right, =COLUMN()-1 numbers columns 1, 2, 3… the way ROW() numbers rows.

Excel compatibility

Matches Excel for single cells and the first column of a range.

Related functions

Last updated