Excel Column Letter to Number Converter

Convert column letters to numbers and back: A is 1, AA is 27, XFD is 16,384.

Column AA is number 27

Formula=COLUMN(AA1)

Column number 703 is AAA

Formula=SUBSTITUTE(ADDRESS(1,703,4),"1","")

How the conversion works

Column letters count in base 26 with no zero: A to Z are 1 to 26, AA is 27, AZ is 52, ZZ is 702 and AAA is 703. The last column in current Excel is XFD, number 16,384.

Formulas

  • Letter to number: =COLUMN(AA1) returns 27. Inside a formula, =COLUMN() returns the column it sits in.
  • Number to letter: =SUBSTITUTE(ADDRESS(1,703,4),"1","") returns AAA. ADDRESS builds the reference A1-style without dollar signs (the 4), and SUBSTITUTE removes the row number.

In VBA

Columns("AA").Column returns 27, and Split(Cells(1, 703).Address, "$")(1) returns “AAA”.

Sources: Function behaviour: Microsoft Support function reference. Results checked against worked examples, and generated formulas evaluated in the open-source HyperFormula engine. Method & sources