Lookup & reference function

COLUMN function

Returns the column number of a cell reference, or of the cell holding the formula if no reference is given.

Available in All versions of Excel, including Microsoft 365, Excel for the web and Excel for Mac

In every Excel versionWorks in Google Sheets

Syntax

COLUMN([reference])
ArgumentWhat it means
referenceOptionalA cell or range. If omitted, COLUMN uses the cell that contains the formula. For a multi-column range, Microsoft 365 returns every column number as a spilled array.

Returns: A whole number: 1 for column A, 2 for B, and so on.

How COLUMN works

COLUMN turns a column letter into a number: =COLUMN(D5) returns 4 because D is the fourth column. With no argument it reports the column of the cell it is typed in. On its own that sounds trivial, but it is a handy building block whenever a formula needs a counter that increases as you copy it to the right.

The best-known trick is feeding COLUMN into the column argument of VLOOKUP or INDEX, so a single formula copied across returns the 2nd, 3rd and 4th columns of a table without editing. Given a range wider than one column, Excel 365 returns an array of numbers that spills, and older versions return only the first column number. COLUMN is not volatile, and the row part of the reference is ignored.

Examples

1Column number of an address

A1fx=COLUMN(D5)
A
14

Result: 4

D is the fourth letter of the column alphabet, so the result is 4. The row (5) does not matter.

2Return several columns by copying across

E2fx=VLOOKUP("P-102", $A$2:$C$5, COLUMN(B1), FALSE)
ABCDE
1CodeProductPrice
2P-101Keyboard25Mouse
3P-102Mouse12
4P-103Monitor149
5P-104Webcam39

Result: Mouse

COLUMN(B1) is 2, so E2 returns the product name. Copy the formula to F2 and the reference becomes C1 (column 3), returning the price 12.

3Array of column numbers

A1fx=COLUMN(B1:E1)
ABCD
12345

In Microsoft 365 a multi-column range returns all four column numbers, spilling across A1:D1.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 16 KB

Common errors and how to fix them

ErrorWhy it happensFix
#NAME?A column letter was typed without a row, like COLUMN(D).Use a full reference such as COLUMN(D1) or a column range COLUMN(D:D).

Tips

  • =COLUMN()-COLUMN($B$1) gives 0, 1, 2... as you copy right from column B - useful for offsets.
  • For the number of columns in a range, use COLUMNS (with an S).

Google Sheets

COLUMN also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

COLUMN in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
CzechSLOUPEC
DanishKOLONNE
DutchKOLOM
FinnishSARAKE
FrenchCOLONNE
GermanSPALTE
HungarianOSZLOP
ItalianRIF.COLONNA
Norwegian (Bokmål)KOLONNE
PolishNR.KOLUMNY
Portuguese (Brazil)COL
Portuguese (Portugal)COL
RussianСТОЛБЕЦ
SpanishCOLUMNA
SwedishKOLUMN
TurkishSÜTUN

Recipes that use COLUMN