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])| Argument | What it means | |
|---|---|---|
reference | Optional | A 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
| A | |
|---|---|
| 1 | 4 |
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
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Code | Product | Price | ||
| 2 | P-101 | Keyboard | 25 | Mouse | |
| 3 | P-102 | Mouse | 12 | ||
| 4 | P-103 | Monitor | 149 | ||
| 5 | P-104 | Webcam | 39 |
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
| A | B | C | D | |
|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 |
In Microsoft 365 a multi-column range returns all four column numbers, spilling across A1:D1.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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.
| Language | Function name |
|---|---|
| Czech | SLOUPEC |
| Danish | KOLONNE |
| Dutch | KOLOM |
| Finnish | SARAKE |
| French | COLONNE |
| German | SPALTE |
| Hungarian | OSZLOP |
| Italian | RIF.COLONNA |
| Norwegian (Bokmål) | KOLONNE |
| Polish | NR.KOLUMNY |
| Portuguese (Brazil) | COL |
| Portuguese (Portugal) | COL |
| Russian | СТОЛБЕЦ |
| Spanish | COLUMNA |
| Swedish | KOLUMN |
| Turkish | SÜTUN |