How to use the excel column letter converter
- Choose Number to letters if you know the column number, or Letters to number if you know the letters.
- Type the column number (a whole number from 1 up) or the column letters (one to six letters, upper or lower case).
- Read the headline for the answer. The result also shows the name length and the same column in R1C1 style.
- Check the nearby columns table to confirm that the neighbors are the ones you expect, then use Copy or Print to keep the answer.
Formula
letters to number: total = total x 26 + letter value, left to right (A = 1 ... Z = 26)
number to letters: repeat remainder = (n - 1) mod 26, letter = A + remainder, n = (n - 1 - remainder) / 26
This is a base 26 count with no zero digit, which is why Z is followed by AA and not by BA. The conversion is exact for any column number up to six letters.
Column 28 is AB
Counting through the alphabet, columns 1 to 26 are A to Z. Column 27 starts the two-letter names with AA, so column 28 is AB. Going the other way, A is 1 and B is 2, so AB is 1 x 26 + 2 = 28.
The last column of a current Excel worksheet is XFD. Working it out: X is 24, F is 6 and D is 4, so (24 x 26 + 6) x 26 + 4 = 16,384. The first three-letter column is AAA, which is column 703, because 26 single letters plus 676 two-letter names come before it.
Why column letters skip a zero
In an ordinary base 26 number, the digit after Z would be written 10. Spreadsheets do something different: they have no zero digit, so after Z comes AA. That is called bijective numeration, and it is why simple tricks such as converting to base 26 with a standard function give wrong answers for columns like Z, AZ and ZZ.
The two directions above handle that detail for you. If you are writing a formula or a script yourself, the rule is to subtract 1 before each division, as shown in the formula box.
Where you need this
Scripts and add-ins often ask for a column by number, while people read letters on the sheet. Importers, macros and API calls for spreadsheets are common cases. If you are moving data between tools, the CSV to Excel converter and the Excel to CSV converter keep columns in order, and the Excel date serial number converter helps with date columns.
Google Sheets and Excel use the same lettering. Their column limits differ, and the page tells you when a column is past the end of a standard Excel sheet.
Assumptions and limits
- Columns are numbered from 1, so column 1 is A. Zero and negative numbers are not columns.
- Letters are read in upper or lower case and must be 1 to 6 letters from A to Z, with no spaces or digits.
- Excel worksheets end at column XFD (16,384). Numbers past that are converted as a pure counting exercise and flagged in a note.
- Nothing is uploaded. The conversion happens in your browser.
Frequently asked questions
What is column 28 in Excel?
Column 28 is AB. Columns 1 to 26 are A to Z, column 27 is AA and column 28 is AB. The converter above gives the same answer for any number you enter.
What is the last column in Excel?
The last column of a current Excel worksheet is XFD, which is column 16,384. Enter 16384 above to confirm, and enter 16385 to see the note that it falls past the end of a standard sheet.
How do I turn column letters into a number?
Switch the converter to Letters to number and type the letters. By hand, start at 0 and for each letter multiply the running total by 26 and add the letter value, with A as 1 and Z as 26.
Why not use a normal base 26 conversion?
Ordinary base 26 has a zero digit, but spreadsheet column names do not. After Z comes AA, not BA, so a plain base conversion is off by one at every rollover. The method on this page subtracts 1 first to fix that.