Excel Column Number to Letter: Formula and Examples

Formulas & functions · Updated November 2, 2026

Excel Column Number to Letter: Formula and Examples

To convert an Excel column number to its letter name, enter a number such as 28 in A2 and put =SUBSTITUTE(ADDRESS(1,A2,4),"1","") in B2; the result is AB. The formula works in Microsoft 365 for Windows and also in older desktop versions of Excel, as long as the number is a valid column index from 1 through 16,384.

Convert a Column Number with a Formula

The formula uses two built-in functions. ADDRESS constructs a cell reference from a row number and a column number. In this case, the fixed row number is 1, while A2 supplies the column number. Its final argument, 4, requests a relative-style address without dollar signs. SUBSTITUTE then removes the row number, leaving just the column letters.

For example, if A2 contains 3, ADDRESS returns C1 and SUBSTITUTE returns C. If A2 contains 28, ADDRESS returns AB1 and the result is AB. The formula does not require a lookup table or a manually entered list of column names.

With the column number in A2 and the result wanted in B2, enter this formula in B2:

=SUBSTITUTE(ADDRESS(1,A2,4),"1","")

To convert a list, fill the formula down beside the numbers. On Windows, select the formula cell and press Ctrl+D to fill down through selected cells; dragging the fill handle at the bottom-right corner of the cell is another option. On Mac, the fill-down shortcut is Control+D. If the data is in an Excel table, a formula entered in a new table column will generally fill down automatically.

Examples of Column Numbers and Letters

Excel column labels do not stop at Z. They continue with two-letter and then three-letter combinations. Here are useful reference points for checking a conversion:

  • 1 is A, 2 is B, and 26 is Z.
  • 27 is AA, 28 is AB, and 52 is AZ.
  • 53 is BA, 702 is ZZ, and 703 is AAA.
  • 16,384 is XFD, the last column in a standard Excel worksheet.

For a concrete worksheet example, if A2 contains 26 and A3 contains 27, the formula returns Z in B2 and AA in B3. If A4 contains 703, it returns AAA. The column index counts positions from the left edge of the worksheet; it is not the number printed in a cell or a count of columns containing data.

Why Excel Uses Labels Such as AA and XFD

Excel column labels follow a base-26-like sequence using the letters A through Z, but there is no zero digit. That detail explains why the sequence goes from Z directly to AA rather than to BA. In an ordinary positional number system, a digit can represent zero; in Excel’s column system, A represents the first position, not zero.

A useful way to understand the pattern is to look at the transitions. After the 26 single-letter labels, Excel begins two-letter labels at AA. The last two-letter label, ZZ, is number 702; the next label is AAA, number 703. The same carry-over pattern continues for three-letter labels. Excel’s worksheet limit is 16,384 columns, and the final label at that limit is XFD.

The ADDRESS-based formula handles those transitions for you. It is less error-prone than trying to work out the letters by hand, especially for large indexes, and it keeps working when the input changes.

Check and Handle Invalid Input

The basic formula is intended for whole-number column indexes from 1 to 16,384. Zero and negative values are not worksheet column positions, and a fractional value is not a valid index. A value beyond 16,384 exceeds the worksheet’s column limit. If numbers come from an import or a calculation, checking them first can make the output clearer.

With the input number in A2 and the checked label in B2, use this version. It returns a message for nonnumeric, fractional, or out-of-range inputs:

=IFERROR(IF(AND(ISNUMBER(A2),A2=INT(A2),A2>=1,A2<=16384),SUBSTITUTE(ADDRESS(1,A2,4),"1",""),"Invalid column number"),"Invalid column number")

For example, 28 returns AB, while 0, 28.5, or 16,385 returns Invalid column number. The IFERROR wrapper also catches errors caused by unexpected input. If you prefer a blank rather than a message, replace both instances of the text Invalid column number with an empty string written as "".

Keep the input as a number rather than typing a letter label into the same input cell. If the source value looks like a number but the result is wrong, check for leading or trailing spaces, text formatting, or a formula that returns text instead of a numeric value.

Convert a Column Letter Back to a Number

The reverse conversion can be useful when a file or script provides a label such as AB but another calculation needs the numeric index. One simple method asks Excel for the column number of a cell reference built from the letters and row 1.

With a column label such as AB in A2 and the numeric result wanted in B2, enter:

=COLUMN(INDIRECT(A2&"1"))

If A2 contains AB, the formula constructs the reference AB1 and returns 28. If A2 contains XFD, it returns 16,384. This method assumes A2 contains a valid column label, without spaces or a row number. INDIRECT is a volatile function, meaning Excel recalculates it whenever the workbook recalculates. For a small conversion task that is usually manageable, but avoid copying it across a very large workbook unnecessarily.

Excel 365 and Excel 2021 also have newer text and array functions, but they are not required for either direction of this conversion. ADDRESS, SUBSTITUTE, COLUMN, and INDIRECT are broadly compatible Excel functions, so they are often a practical choice when a workbook may be opened in different versions.

Column Labels Are Not the Same as Worksheet Headings

A common source of confusion is the difference between converting an index to letters and changing how Excel displays row and column references. The formula above returns a text value such as AB in a cell. It does not change Excel’s built-in headings at the top of the worksheet, and it does not rename or move a column.

By default, Excel displays column headings as letters and row headings as numbers. If the worksheet is showing numbered columns instead, it is probably using R1C1 reference style. In that style, references identify rows and columns with numbers rather than the familiar A1-style letter-and-number combination.

In Excel for Microsoft 365 on Windows, turn that display off by going to File > Options > Formulas and clearing the R1C1 reference style check box. The setting changes how references are displayed, not the actual position of cells or the contents of the workbook. Excel for Mac has a separate settings interface; look under Excel > Settings (or Preferences in some releases) for the formula or general settings that include R1C1 reference style. Excel for the web has fewer desktop settings, so use the desktop app if you cannot find the option there.

Common Problems and Practical Tips

  • The result is #VALUE!: Check that the input is a valid numeric index and not text, blank content, or a decimal. Use the checked formula if the source data is inconsistent.
  • The result is wrong for a large number: Confirm that the number is a column index, not a worksheet row number or a count that starts at zero. The first column is 1, not 0.
  • The formula shows instead of calculating: Make sure the cell is not formatted as Text. Change its format to General, then re-enter the formula. Also check that Show Formulas is not enabled; on Windows, Ctrl+` toggles that worksheet view.
  • The formula displays an error after copying: Relative references such as A2 shift as you fill down, which is usually what you want. If the input is somewhere else, update the reference or use an absolute reference such as $A$2 when it must stay fixed.

The formula returns text, not a live reference to the original worksheet column. That makes the result useful for reports, labels, and export files, but it will not automatically select or rename a column. If the original number changes, the formula recalculates and displays the corresponding new letters.

Frequently Asked Questions

What formula converts an Excel column number to a letter?
With the number in A2, use =SUBSTITUTE(ADDRESS(1,A2,4),"1",""). For example, 28 returns AB. The formula works because ADDRESS creates AB1 and SUBSTITUTE removes the row number.

What number is column XFD?
XFD is column 16,384, the last column in a standard Excel worksheet. A worksheet cannot use a column index beyond that limit.

Can I change Excel’s column headings from numbers back to letters?
Yes, if the worksheet is using R1C1 reference style. In Windows Excel, open File > Options > Formulas and clear R1C1 reference style. This changes the reference display, not the worksheet’s structure.

Does the number-to-letter formula work for columns after Z?
Yes. It handles multi-letter labels such as AA, AB, ZZ, AAA, and XFD. There is no need to build a separate formula for each label length.

Can I convert a column letter back to a number?
Yes. If A2 contains a valid column label, =COLUMN(INDIRECT(A2&"1")) returns its index. For example, AB returns 28. The label must be a valid reference within the worksheet’s column limit.

Choosing the Right Method

For a quick conversion or a reusable list, the ADDRESS and SUBSTITUTE formula is a straightforward choice: it is compact, works across many Excel versions, and responds automatically when the input changes. Add the validation version when values may be blank, fractional, or outside the worksheet limits. Use the reverse formula only when you need to turn a valid letter label into a number, and remember that INDIRECT recalculates frequently.

If the real issue is that headings appear as numbers, change the R1C1 setting rather than adding a conversion formula. Identifying which task you mean—converting a value, reversing a conversion, or changing the reference display—will lead to the correct solution without altering the worksheet data.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.