Skip to content

Guide Lookups

I have column 27 and I need to know it is AA

A formula gave you a position and you need the letter, or you have a letter and need the number. Both are one formula, and neither is remotely obvious.

Any version ADDRESS + COLUMN Excel + Google Sheets
I have column 27 and I need to know it is AA
The short answer

=SUBSTITUTE(ADDRESS(1,27,4),"1","") returns AA. ADDRESS builds the reference AA1 and SUBSTITUTE removes the row number. Going the other way, =COLUMN(AA1) returns 27. The 4 is what makes ADDRESS give a relative reference rather than $AA$1.

Why the letters are not a simple pattern

Column letters look like counting until you reach the end of the alphabet. Then column 27 is AA, 28 is AB, 703 is AAA, and the last column, 16,384, is XFD.

It resembles base 26 but is not quite, because there is no zero digit — Z is followed by AA, not by A0. Writing the conversion yourself is a small, fiddly piece of arithmetic that is easy to get wrong at exactly the boundaries.

ADDRESS already knows all of it. Let it build a reference and take the letters off the front.

Column 26ZColumn 27AA, not A0Column 703AAAWriting it yourselfwrong at the boundaries
It looks like base 26 and is not, because there is no zero digit.
What you are seeing, and what actually happened
What you seeWhat actually happenedWhat fixes it
Getting $AA$1Default absolute referencePass 4 as the third argument
Row digits left in the answerThe row number is still attachedSubstitute "1" away
Wrong for column 10 with row 10The SUBSTITUTE removed a "1" from the lettersAlways build with row 1
#VALUE!The column number is 0 or negativeColumns start at 1
Need it inside another formulaThe letter is text, not a referenceUse INDEX, not INDIRECT

How to convert between column numbers and letters

You have a column numberwhat for?To fetch a valueINDEX takes the number directlyFor a person to readADDRESS, then strip the rowTo build a referenceINDIRECT is volatile — avoid
Most of the time the letter is a means to an end that does not need it.
1

Number to letter

Always build with row 1, so there is exactly one digit to remove:

27 to AA
=SUBSTITUTE(ADDRESS(1,27,4),"1","")

The 4 means a relative reference. Leave it out and you get $AA$1, and the dollar signs come along for the ride.

2

Letter to number

Directly, or from a cell:

AA to 27
=COLUMN(AA1)
=COLUMN(INDIRECT(A1&"1"))

The second reads the letter from A1. INDIRECT is volatile, so avoid it in a column of thousands of formulas.

3

Get the letter of the current cell

Useful in a header row that labels itself:

This cell's own column
=SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","")

Fill it across and each cell reports its own letter.

4

Prefer INDEX over building a reference

Most of the time the letter is a means to an end, and the end does not need it:

Skip the letter entirely
=INDEX($A$1:$Z$100,5,27)

Row 5, column 27, no letter and no INDIRECT. Faster, not volatile, and it survives inserted columns. Reach for the letter only when a human has to read it.

Everything on this page, as a workbook you can use on your own data

The Excel Data Cleanup Kit — a seven-tab workbook that finds all nine of these faults in a pasted column and hands back a cleaned version, a five-page PDF guide, and a short read-me. Free, no email required.

  • Excel-Data-Cleanup-Workbook-Free.xlsx — paste a column, read the diagnosis, take the cleaned output
  • Excel-Data-Survival-Guide.pdf — the eight failures, the import routine that prevents them, every formula explained
Download the kit — free 121 KB .zip · Excel & Google Sheets

Plain .xlsx: no macros, no add-ins. Opens in Excel, Google Sheets, Apple Numbers and LibreOffice Calc.

Below here is why it happens

Why row 1 matters in the trick

SUBSTITUTE removes every occurrence of what you give it. Build ADDRESS(10,10,4) and you get J10; substituting "10" away leaves J, which is right by luck. Build ADDRESS(1,1,4) for column 1 and you get A1, and removing "1" leaves A, which is right by design.

Always build with row 1 and remove "1". It is correct for every column, including the ones with a 1 in the row that would otherwise bite.

Turning off letters altogether

Excel can label columns with numbers instead: File → Options → Formulas → R1C1 reference style. Then column 27 is simply 27. It changes how every formula is written, so it is a whole-workbook decision rather than a convenience, but for anyone working with column positions constantly it removes the problem at the source.

Where this actually comes up

Questions people ask

How do I convert a column number to a letter?

Use =SUBSTITUTE(ADDRESS(1,27,4),"1",""). ADDRESS builds the reference AA1 and SUBSTITUTE removes the row number.

What does the 4 in ADDRESS do?

It asks for a relative reference. Without it you get $AA$1 and the dollar signs end up in your answer.

How do I convert a letter back to a number?

=COLUMN(AA1) returns 27. If the letter is in a cell, use =COLUMN(INDIRECT(A1&"1")), though INDIRECT is volatile.

Why must I build with row 1?

SUBSTITUTE removes every occurrence of the text you give it. Building with row 1 means there is exactly one digit to remove, which is correct for every column.

Do I need the letter at all?

Often not. INDEX takes a column number directly, so if you are fetching a value there is no need to build a reference from a letter.

Can I make Excel show numbers instead of letters?

Yes — File > Options > Formulas > R1C1 reference style. It changes how every formula is written, so treat it as a whole-workbook decision.

Related guides

Take the workbook with you

The Excel Data Cleanup Kit — a seven-tab workbook that finds all nine of these faults in a pasted column and hands back a cleaned version, a five-page PDF guide, and a short read-me. Free, no email required.

  • Excel-Data-Cleanup-Workbook-Free.xlsx — paste a column, read the diagnosis, take the cleaned output
  • Excel-Data-Survival-Guide.pdf — the eight failures, the import routine that prevents them, every formula explained
Download the kit — free 121 KB .zip · Excel & Google Sheets

Plain .xlsx: no macros, no add-ins. Opens in Excel, Google Sheets, Apple Numbers and LibreOffice Calc.