The column number for “AZ” in Excel is 52. In Excel’s column-letter system, A is 1, B is 2, and so on through Z (26), then AA is 27, AB is 28, and AZ is 52. This article explains how the numbering works, why Excel uses letters, and how to convert between letters and numbers.
How Excel Column Letters Work
Excel uses a base-26-like system for column labels, but with a twist: it has no zero. The letters run A through Z (1–26), then continue with AA, AB, AC, and so on. After ZZ comes AAA, AAB, etc. This is often called “bijective base-26” because each position can hold values 1 through 26, rather than 0 through 25.
To convert a column letter to a number, you treat it like a numeral system where A=1, B=2, …, Z=26. For a two-letter column like AZ, the calculation is: (value of first letter × 26) + value of second letter = (1 × 26) + 26 = 52. For a three-letter column like AAA, it would be (1 × 26 × 26) + (1 × 26) + 1 = 703.
Column Number Reference: A to AZ
Here is a quick reference for the columns from A to AZ, showing the letter and its corresponding number:
- A = 1, B = 2, …, Z = 26
- AA = 27, AB = 28, …, AZ = 52
- BA = 53, BB = 54, …, BZ = 78
- CA = 79, and so on
So if you are looking for the column number for AZ, it is 52. If you need the letter for column 52, it is AZ.
Why Excel Uses Letters Instead of Numbers
Excel uses letters for columns and numbers for rows to create cell references like A1, B2, or AZ52. This system dates back to early spreadsheet programs, including VisiCalc and Lotus 1-2-3, which used the same convention. The letters make it easier to refer to columns in formulas and to read cell addresses. For example, in a formula, you might write =SUM(A1:A10) to add up values in column A. If columns were numbered, the reference might be less intuitive.
Another reason is that letters allow for an unlimited number of columns (up to Excel’s limit of 16,384 columns, which is XFD). Using letters avoids confusion with row numbers, so a cell reference like C5 is unambiguous: column C, row 5.
How to Find the Column Number for Any Letter
If you need to convert a column letter to a number in Excel, you can use the COLUMN() function. For example, to get the number for column AZ, you could enter =COLUMN(AZ1) in any cell, and it will return 52. This works because the function returns the column number of the reference.
Alternatively, you can use a formula that converts a text letter to a number. For a two-letter column like AZ, the formula is: =(CODE(LEFT("AZ",1))-64)*26 + (CODE(RIGHT("AZ",1))-64). The CODE function returns the ASCII code for a character; for uppercase letters, ‘A’ is 65, so subtracting 64 gives 1 for A, 2 for B, etc. This formula works for up to two letters. For three letters, you would need a more complex formula.
To go the other way, from a number to a letter, you can use the ADDRESS() function. For example, =SUBSTITUTE(ADDRESS(1,52,4),"1","") returns “AZ” because it creates an address for row 1, column 52, with relative reference (4), and then removes the row number.
Common Problems and Misconceptions
One common misconception is that Excel uses base-26 like hexadecimal (base-16) or binary (base-2). In true base-26, after Z (which would be 25 in zero-based), the next number would be 10, but Excel uses AA, which is 27. That is because Excel’s system has no zero digit; it goes from Z (26) directly to AA (27).
Another issue is when users try to convert column letters using a simple COLUMN() function but forget that the reference must be a valid cell. For example, =COLUMN("AZ") will not work because COLUMN expects a reference, not a text string. You need to use a cell reference like AZ1.
Also, some users confuse column numbers with row numbers, especially when using the ROW() function. Remember that ROW() returns the row number, and COLUMN() returns the column number.
Comparing Excel Column Letters to Other Spreadsheets
Google Sheets uses the same column-letter system as Excel, so AZ is also column 52 in Google Sheets. LibreOffice Calc also follows the same convention. However, some older or specialized spreadsheet programs may use numbers for columns, but Excel’s system has become the de facto standard.
In Excel for the web and Excel for Mac, the column letters are the same, but some keyboard shortcuts differ. For example, to jump to the last column in a worksheet, on Windows you press Ctrl+Right Arrow, while on Mac it is Control+Right Arrow. But the column letters themselves are identical.
Tips for Working with Column Numbers in Formulas
When you need to reference a column by its number in a formula, you can use the ADDRESS() function combined with INDIRECT(). For example, to sum all values in column 52 (AZ), you could use =SUM(INDIRECT(SUBSTITUTE(ADDRESS(1,52,4),"1","")&":"&SUBSTITUTE(ADDRESS(1,52,4),"1",""))). This is a bit complex, but it works.
For simpler tasks, you might use the COLUMN() function in conditional formatting or data validation. For instance, to highlight cells in column AZ, you could use a formula like =COLUMN()=52 in a conditional formatting rule.
If you are writing a macro in VBA, you can convert a column number to a letter using the Split function and the Cells property. For example:
Dim colNum As Integer
colNum = 52
Dim colLetter As String
colLetter = Split(Cells(1, colNum).Address, "$")(1)
MsgBox colLetter ' Displays "AZ"
Remember to save a copy of your workbook before running any macro, as macros cannot be undone with Ctrl+Z.
Frequently Asked Questions
Q: What is the column number for AZ in Excel?
A: The column number for AZ is 52. This is because A is 1, Z is 26, and AZ is calculated as (1×26)+26 = 52.
Q: How do I convert a column letter to a number in Excel?
A: You can use the formula =COLUMN(AZ1) to get 52. For a text string, use =(CODE(LEFT("AZ",1))-64)*26 + (CODE(RIGHT("AZ",1))-64).
Q: What is the last column in Excel?
A: The last column in Excel is XFD, which is column number 16,384. This is the maximum number of columns supported in Excel 2007 and later.
Q: Why does Excel start with A instead of 1?
A: Excel uses letters for columns to avoid confusion with row numbers and to follow the convention established by early spreadsheet programs. It also allows for a more compact representation in cell references like A1.
Q: Is AZ column 52 in Google Sheets too?
A: Yes, Google Sheets uses the same column-letter system, so AZ is also column 52 in Google Sheets.
Related
- Shortcut to Exit Window? Quick Keys & Fixes
- Data Entry and Data Management: Clear Answers
- Google Sheets Percentage of Total: Easy Formula
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Workbook Structure: Sheets, Cells, and FilesAn Excel workbook is the complete spreadsheet file: it contains one or more sheets, and each worksheet organizes…
- How to Hide Cells in Excel Without Deleting DataTo hide cells in Excel, select the rows or columns containing them, then choose Home > Cells >…
- Excel Calendar Template for Content PlanningYes, you can build a content planning calendar in Excel using a simple grid layout with columns for…
- Add a Cover Page in Microsoft Word 365To add a cover page in Word 365 for Windows, open the document and choose Insert > Pages…
- How to Color Code Names in Excel with Conditional FormattingTo color code names in Excel, select the name cells, then use Home > Conditional Formatting to create…
- How to Merge Cells in Jira: Options and WorkaroundsYou cannot merge table cells with Jira’s standard issue editor: it does not provide a native merge-cells command.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.