Lookup and reference functions
COLUMN
Matches all 9 recorded answers
Recorded: 9 workbook cells. How we measure this · See the Rust code
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | COLUMN |
| Bulgarian | COLUMN |
| Czech | COLUMN |
| Danish | COLUMN |
| German | COLUMN |
| Greek | COLUMN |
| English (Australia) | COLUMN |
| English (United Kingdom) | COLUMN |
| English (United States) | COLUMN |
| Spanish | COLUMN |
| Estonian | COLUMN |
| Finnish | SARAKE |
| French | COLUMN |
| Hebrew | COLUMN |
| Croatian | COLUMN |
| Hungarian | COLUMN |
| Indonesian | COLUMN |
| Italian | COLUMN |
| Japanese | COLUMN |
| Korean | COLUMN |
| Lithuanian | COLUMN |
| Latvian | COLUMN |
| Norwegian | COLUMN |
| Dutch | COLUMN |
| Polish | COLUMN |
| Portuguese (Brazil) | COLUMN |
| Portuguese (Portugal) | COLUMN |
| Romanian | COLUMN |
| Russian | COLUMN |
| Slovak | COLUMN |
| Slovenian | COLUMN |
| Serbian (Latin) | COLUMN |
| Swedish | COLUMN |
| Thai | COLUMN |
| Turkish | SÜTUN |
| Ukrainian | COLUMN |
| Vietnamese | COLUMN |
| Chinese (Simplified) | COLUMN |
| Chinese (Hong Kong) | COLUMN |
| Chinese (Traditional) | COLUMN |
Names from Microsoft's support site.
What it does
COLUMN([reference])
COLUMN([reference]) returns the column coordinate of a reference as a number: column A is 1,
B is 2, and so on. Called with no argument it returns the column coordinate of the cell
containing the formula.
Microsoft documents that when reference is a range of cells, COLUMN returns the column
numbers of that range as a horizontal array. In modern Excel that array spills; in
pre-dynamic-array Excel it required array entry. This is the property that makes COLUMN a
sequence generator in older workbooks — COLUMN(A1:E1) as a stand-in for SEQUENCE.
Arguments
| Argument | Meaning |
|---|---|
reference | Optional. The cell or range whose column number you want. Omitted means the calling cell. |
Two things about this single argument are commonly misunderstood.
Omitted is not the same as empty. COLUMN() delivers the Missing marker and selects the
caller-context behaviour; COLUMN(A1) where A1 is blank delivers a perfectly good reference
to an empty cell and returns 1. The value model keeps Missing and Empty distinct precisely so
that functions like this one can branch on the difference — see
the value universe.
The documentation for the sibling ROW states that its reference cannot refer to multiple
areas, and the same restriction should be expected here; the Handbook has not established what
COLUMN does with a union reference.
Try it
Quirks
Result and edge cases
Return kind: Number for a single cell; Array (a horizontal array of column numbers) for a
multi-column range, per Microsoft's documentation.
Edge cases specific to this function:
- A multi-row, single-column range. The column number is constant down the range. Whether the result is a single number or an array of repeated numbers is a shape question the Handbook has not settled.
- A whole-column reference (
A:A) — one column, so presumably 1, but the interaction with the array-returning rule is untested here. - A three-dimensional reference (
Sheet1:Sheet3!A1) — the coordinate is well defined but the reference shape is distinct in the value model. - A spill anchor (
B1#) — the referenced range's extent is dynamic, so the result's shape is too. - Inside a lifted or iterated context (a
LAMBDAbody,BYCOL, a defined name evaluated from several cells) the "calling cell" thatCOLUMN()reports is a question about the execution context, not about this function's kernel — and it is exactly where caller-aware functions get surprising.
Errors
Microsoft's page does not publish an error table for COLUMN. The expected failure is a
non-reference argument — COLUMN(5), COLUMN("A1") — for which #VALUE! is this family's
conventional code; the Handbook records that as expected, not verified. An error value passed as
the argument propagates under the universal rule in
coercion and lifting.
How to implement
Notes for implementers
COLUMN()is not evaluable without a host. The reference implementation classifies itHostSerializedand dependent on caller context; an implementation with no notion of a calling cell cannot answer the no-argument form at all, and should say so rather than invent a default. This is a real fault line between a function library and a calculation engine.- The relative/absolute distinction is irrelevant here.
$A$1andA1have the same column number;COLUMNreads the resolved coordinate, not the formula text. - Copying a formula changes the answer in the no-argument form and, through relative reference adjustment, usually in the argument form as well. Any caching layer keyed on formula text rather than on cell position will be wrong for this function.
Rust code
Show the CalcFunc source of this function
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
COLUMN · 7 lines · calc-func/src/catalogue/lookup.rs on GitHubeager(
COLUMN,
"COLUMN",
CallableArityShape::range(0, 1),
&[Parameter::value_or_reference("reference")],
column,
)
Kernels shared with other functions
eagercatalogue/lookuppatterncatalogue/lookupmatchescatalogue/lookupLine::lencatalogue/lookupLine::scancatalogue/lookupreadercatalogue/lookupcell_valuecatalogue/lookuprowscatalogue/lookupcolumnscatalogue/lookupvaluecatalogue/lookupspancatalogue/lookupshapecatalogue/lookupindex_numbercatalogue/lookupindexcatalogue/lookupselectorcatalogue/lookupindexedcatalogue/lookupselectcatalogue/lookuprowcatalogue/lookupcolumncatalogue/lookupposition_ofcatalogue/lookupareascatalogue/lookup
Argument and result plumbing
Parameter::value_or_referencecatalogue
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Alternatives
Relationships
ROWis the same function on the other axis and shares every structural property: the optional argument, the caller-context default, the array result over a range.COLUMNScounts columns;COLUMNlocates them.COLUMNS(A1:E1)is 5,COLUMN(A1:E1)is the array 1…5. The near-identical names for genuinely different operations are a standing source of confusion, and the same trap exists forROW/ROWS.SEQUENCEreplaces the historical use ofCOLUMN(range)as a horizontal counter, and does so without depending on where the range happens to sit.ADDRESSconsumes coordinates;COLUMNproduces them.CELL("col", ref)answers the same question through the workbook-metadata route.OFFSETandINDEXare the functions you feed a computed column number to.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents