Excel columns have numerical positions even though their headings use letters: A is column 1, Z is 26, AA is 27, and the last column, XFD, is 16,384. To return a column number in a worksheet formula, use =COLUMN(D1); it returns 4.
Why Excel Uses Letters for Columns
Excel labels columns with letters so their references are visually distinct from row numbers. A cell address such as B3 means column B and row 3. The letter is a heading, not the value stored in the cell, and Excel can translate it to a numeric position whenever a formula or feature needs one.
This distinction matters when you are building formulas, checking a reference, writing a procedure, or comparing column positions. The worksheet may display AA at the top, while Excel treats that location as column 27. Column letters are not separate names assigned without a pattern: they follow a counting system that extends the familiar alphabet sequence.
How the Column Numbering System Works
Excel column labels use a base-26-style sequence with letters A through Z. Unlike ordinary decimal numbers, the sequence has no zero digit. A represents 1, B represents 2, and Z represents 26. Once the single-letter labels are used, Excel adds another letter and continues with AA.
The first letter of a multi-letter label contributes a larger place value. For example, AA means one group of 26 plus one more: 26 + 1 = 27. AB is 26 + 2 = 28. BA is two groups of 26 plus one: 52 + 1 = 53. In the same way, XFD is the 16,384th column in a modern Excel worksheet.
A useful way to read the sequence around the change from one letter to two is:
- Y = 25 and Z = 26
- AA = 27, AB = 28, and AC = 29
- AZ = 52, followed by BA = 53
- ZZ = 702, followed by AAA = 703
Because there is no zero label, the transition can feel different from counting in base 10. There is no column A0 or A0A between Z and AA. Excel goes straight from Z to AA.
Common Column Letters and Their Numbers
Knowing a few checkpoints makes it easier to estimate a column number without calculating every position. These examples also help when reading a formula that contains a far-right reference.
- A = 1; B = 2; C = 3
- J = 10; Z = 26
- AA = 27; AZ = 52; BA = 53
- ZZ = 702; AAA = 703
- XFD = 16,384, the final column in current Excel worksheets
For example, if a report uses column M for monthly totals, M is the 13th column. If a formula points to BC, that is column 55: B contributes 2 groups of 26, and C contributes 3, so 2 × 26 + 3 = 55. This is a handy check when tracing references across a wide sheet.
Get a Column Number with COLUMN
The built-in COLUMN function is the simplest way to ask Excel for a column position. In a worksheet where you want to check the position of column D, enter =COLUMN(D1). The result is 4. The row number in the reference does not affect the answer; D1, D5, and D100 are all in column 4.
The function accepts a cell or range reference. With a reference to a range, it returns the number of the range’s first column. If the reference is left out, COLUMN returns the number of the column containing the formula itself. For clarity and easier maintenance, many people prefer to include a reference explicitly rather than rely on where the formula happens to be placed.
For example, with a formula entered in cell F2, =COLUMN() returns 6 because F is the sixth column. If you copy that formula one column right, the result becomes 7. By contrast, =COLUMN(D1) continues to return 4 when copied elsewhere because the reference identifies column D. This makes the two forms useful for different tasks: one reports the formula’s current location, and the other reports a specified reference.
Convert a Column Label Stored as Text
Sometimes a column label is stored as text rather than used as a worksheet reference. For example, cell A2 might contain the characters AA. COLUMN cannot interpret the text in A2 as a reference by itself, but INDIRECT can turn a text reference into one. If A2 contains a valid column label, use =COLUMN(INDIRECT(A2&"1")). With AA in A2, the result is 27.
The formula adds 1 to the text to create a reference such as AA1, INDIRECT interprets that reference, and COLUMN returns its position. The row number is only there to make a valid cell reference; the result is the column number. This approach also works for labels such as XFD, which returns 16,384.
There are limitations to this method. A2 must contain a valid column label for the worksheet, without extra spaces or unrelated characters. INDIRECT is volatile, which means Excel recalculates it more often than many ordinary formulas. For a small lookup or occasional conversion that may be acceptable; in a very large workbook, repeated volatile formulas can add calculation overhead. If you already have a cell reference rather than text, use COLUMN directly instead.
Column Number Is Not the Same as Sorting Values
The phrase numerical order can also mean sorting the numbers inside a worksheet column. That is a separate operation from converting a heading such as AA to 27. For instance, if a column contains 3, 20, and 100, sorting it from smallest to largest arranges the cell values as 3, 20, 100. It does not change the column’s letter or its position in the worksheet.
To sort a list of numbers, select a cell in the list and choose Data > Sort Smallest to Largest. If the list is part of a table or has related information in neighboring columns, make sure the full records stay together. When Excel asks whether to expand the selection, choose that option if each row’s values belong together; sorting only one column can separate numbers from their corresponding names or dates.
Numbers stored as text can sort unexpectedly. For example, text values may be ordered alphabetically, so 100 can appear before 20 because the first character, 1, comes before 2. If a sort looks wrong, check whether the cells are real numbers or text that merely looks numeric. Converting the entries to numbers before sorting usually resolves that issue, but inspect the data first so that leading zeros or codes are not accidentally changed.
Column Numbers in Formulas and References
Excel formulas normally use letter-and-number references, such as C5, rather than a visible numeric column index. Still, understanding the index helps explain how references behave. A reference to C5 points to the third column and fifth row. A reference to AA5 points to the 27th column and fifth row.
Column positions can also matter when a worksheet changes. Inserting a column can move existing cells and cause Excel to update many direct references automatically. That is usually helpful, but it can affect formulas or external processes that expect a particular field to stay at a fixed position. If a process depends on a column number, document what that number represents rather than relying on a letter alone, since letters can shift when columns are inserted or deleted.
In VBA or other automation, column numbers are often convenient because they can be stored and calculated as integers. In ordinary worksheet formulas, however, COLUMN is usually the clearer choice. Avoid assuming that the letters A through Z are the only possible headings: most worksheets continue through multiple letters, all the way to XFD.
Excel’s Column Limit and Version Context
Current Excel for Microsoft 365 on Windows supports 16,384 columns per worksheet, from A through XFD. Current Excel for Mac and Excel for the web use the same modern worksheet limit. That limit has applied to Excel versions beginning with Excel 2007, so a workbook created in a current version can extend much farther right than one made in older Excel releases.
Excel 2003 and earlier used a smaller worksheet grid with 256 columns, ending at IV. This is one reason a file opened or converted between very old and modern workbook formats may behave differently. If a reference stops at IV in a legacy file, that does not mean XFD is invalid in current Excel; it reflects the older worksheet format or application version.
The maximum is a worksheet boundary, not a recommendation to use every available column. A workbook can become difficult to navigate and maintain long before it reaches XFD. For large datasets, clear headings, Excel tables, and well-organized sheets are generally more useful than spreading data across thousands of columns without a consistent structure.
Frequently Asked Questions
What number is column AA in Excel?
AA is column 27. The first A represents 26, and the second A represents 1, giving 26 + 1 = 27.
What is the number of the last Excel column?
The last column in current Excel worksheets is XFD, which is number 16,384. Excel 2003 and earlier ended at IV, or column 256.
How do I find the number of the column I am in?
Enter =COLUMN() in a cell. It returns the number of the column containing the formula. For example, in F2 the result is 6.
Does COLUMN count from zero or one?
It counts from one. Column A returns 1, not 0, and column Z returns 26.
Why is a numeric sort not in numerical order?
The entries may be stored as text rather than numbers, or Excel may have sorted only one column and separated related row data. Check the cell values’ data type and make sure the full records are included in the sort.
Related
- How to Group Rows in Excel and Hide Them
- Group Rows in Excel: Keyboard Shortcut and Steps
- Excel Hyperlink Shortcut: How to Add a Link
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Not Highlighting Selected Cell? Causes and FixesExcel normally marks the active cell with a colored border; when you select several cells, the rest of…
- Excel Not Clicking the Correct Cell? Causes and FixesIf Excel is not clicking the correct cell, first press Esc, set the worksheet zoom to 100%, and…
- Delete Blank Rows in Excel: Keyboard Shortcut GuideTo delete blank rows quickly in Excel for Microsoft 365 on Windows, select a column that should contain…
- Excel New Row Shortcut: Insert Rows Above or BelowIn Excel for Microsoft 365 on Windows, select the row where you want the new one, then press…
- Page Break in Excel Shortcut: Insert and Adjust BreaksIn Excel for Microsoft 365 on Windows, select the row, column, or cell where the printed page should…
- Excel Yes or No Drop-Down: Create and Customize ItYes. In Excel for Microsoft 365 on Windows, select the cells, choose Data > Data Validation > Data…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.