Formualizer Docs

COLUMN

Returns the column number of a reference, or of the current cell when omitted.

COLUMN returns a 1-based column index (A = 1).

The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.

Syntax

=COLUMN([reference])

Arguments

ArgumentTypeRequiredDefault
referencerange (range)Optional—

Differences from Excel

Excel requires a reference when the argument is supplied. Formualizer can also evaluate expressions in that position and propagate their errors.

The examples enter the formula in cell CV100.

Remarks

  • With a range argument, COLUMN returns the first column in that reference.
  • Without arguments, it uses the column of the formula cell.
  • Full-row references such as 5:5 return 1.
  • Invalid references return an error (#REF!/#VALUE! depending on context).

Examples

Read the coordinate of an explicit cell reference.

Formula =COLUMN(B4)

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Omit the reference to use the cell containing the example formula.

Formula =COLUMN()

Expected result 100

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

The first cell has coordinate one along both axes.

Formula =COLUMN(A1)

Expected result 1

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Column of a single-cell reference

Formula =COLUMN(C5)

Expected result 3

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

Column of a range

Formula =COLUMN(B2:D4)

Expected result 2

Try this formula

This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.

FAQ

What does COLUMN return for a range like B2:D4?

COLUMN returns the first column index of the reference (2 for column B).

What if COLUMN() is used without a reference?

It returns the formula cell's column number, or #VALUE! if current-cell context is unavailable.

Implementation

Engine source

On this page