Skip to content

COLUMN function

Overview

The COLUMN Function in IronCalc is a lookup & reference formula that is used to query and return the column number of a referenced column or cell.

Usage

Syntax

COLUMN(reference) => column

Argument descriptions

Additional guidance

  • When referencing a range of cells, only the column number of the leftmost cell will be returned.
  • You are also able to reference complete columns instead of individual cells.
  • When using a Named Range as a reference, the reference is not case sensitive.
  • IronCalc supports the use of both Absolute ($A$1) and Relative (A1) references.
  • Cross-sheet references are also supported.

Returned value

COLUMN returns the number of the specific cell or column which is being referenced. If no reference is included, the column number of the cell where the formula is entered will be returned.

Error conditions

  • A #NAME? error is returned if a Named Range being referenced is deleted.
  • A #REF! error is returned if a cell being referenced is deleted.
  • A #VALUE! error is returned if a column being referenced is deleted.

Details

The COLUMN Function can only be used to display the correlating number of a single column within a Sheet. If you wish to show the number of columns used within a specific range, you can use the COLUMNS Function.

Examples

No Cell Reference

When no cell reference is made, the formula uses =COLUMN(). This will output the column number of the cell where the formula is entered.

For example, if the formula is placed in cell A1, then "1" will be displayed.

With Cell Reference

When a cell reference is made, the formula uses =COLUMN(Referenced Cell). This will then output the column number of the referenced cell, regardless of where the formula is placed in the sheet.

For example, if B1 is the referenced cell, then "2" will be the output of the formula, regardless of where the formula is placed in the sheet.

Note: references do not have to be specific cells, you can also reference complete columns. For example, =COLUMN(B:B) would also result in an output of "2".

Range References

The COLUMN function can also be used to reference a range of cells or columns. In this case only the leftmost column will be the resulting output.

For example, =COLUMN(A1:J1) will result in the output of "1".