Going Stellar

Home/Google Sheets reference

Google Sheets function · Lookup

COLUMN in Google Sheets: syntax and examples

COLUMN returns the number of a column, counting A as 1. Given a range, it returns only the first column number, unless the formula runs inside ARRAYFORMULA. Combined with INDEX or ADDRESS it makes formulas that follow a column position.

Syntax

COLUMN([cell_reference])

Arguments

ArgumentTypeRequiredWhat it does
cell_referencereferencenoThe cell or range to read the column from. Without it, the column of the cell holding the formula.

Examples

The examples use this table, starting in A1:

ItemQtyPrice
Lamp379.9
Chair5549
Desk2310
=COLUMN(C1)

Result: 3

Column C is number 3.

Run in a Google Sheet (English US locale) on .

=COLUMN(AA1)

Result: 27

Columns continue after Z: AA is 27.

Run in a Google Sheet (English US locale) on .

=COLUMN(B2:D2)

Result: 2

A range on its own returns only its first column number.

Run in a Google Sheet (English US locale) on .

=INDEX(A2:C4, 2, COLUMN(C1))

Result: 549

Use COLUMN as the column argument of INDEX to read the third column of row 2.

Run in a Google Sheet (English US locale) on .

=SUBSTITUTE(ADDRESS(1, COLUMN(AB1), 4), "1", "")

Result: AB

Turn a column number back into letters: AB.

Run in a Google Sheet (English US locale) on .

Common errors

  • Without an argument, COLUMN() gives the column of the cell that holds the formula.
  • A range on its own returns only the first column number: COLUMN(B2:D4) is 2. Inside ARRAYFORMULA you get 2, 3 and 4 across one row, even for a multi-row range.
  • The result is a number, not a letter. Use ADDRESS with SUBSTITUTE to get the letters back.
  • The argument must be a reference. Text such as "a" returns #N/A.

Compared with Excel

Same syntax in Excel.

Questions and answers

How do I get the column letter instead of the number?

Use =SUBSTITUTE(ADDRESS(1, COLUMN(AB1), 4), "1", ""). ADDRESS builds the reference AB1 and SUBSTITUTE removes the row number.

Sources

  1. COLUMN (Docs Editors Help)

Markdown version · All functions