TOOLTIKI Lovable tool, really free
Developer Lists

Excel column letter to number

What to do

Transformed in your browser · nothing is uploaded

Local · bijective base-26, no zero digit
Advertisement
320 × 100

Converts spreadsheet column letters to their index and back. A is 1, Z is 26, AA is 27 and XFD is 16,384 — the last column in a modern Excel sheet.

How to use the excel column letter to number

1 Paste your text into the first box.
2 Choose what you want done to it.
3 Copy the result, or save it as a text file.

The system is bijective base-26, which is not the same as ordinary base-26 and is why the obvious implementation is wrong. In normal base-26 there would be a zero digit, so after Z you would get BA. Spreadsheet columns have no zero — the digits run A to Z with no placeholder — so after Z comes AA. The practical effect is that the conversion needs a subtraction inside the loop, and code that forgets it works perfectly up to column 26 and is wrong from 27 onwards, which is exactly the sort of bug that reaches production. XFD at 16,384 is the limit because Excel uses 14 bits for the column index.

Questions

Because the system has no zero digit. It is bijective base-26, so the sequence is A–Z then AA, not A–Z then BA.

Microsoft — Excel specifications and limits
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING