Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Alphabetic Column Designation.

Alphabetic Column Designation

by Allen Wyatt
(last updated December 23, 2013)

5

You can easily determine the numeric column of cell by using the COLUMN function. All you need to do is put a formula like this in a cell, and the result is a value where A=1, B=2, etc.:

=COLUMN()

What if you want an alphabetic value, rather than a numeric value? This can be done in any of several different ways. For instance, the following formula will work very nicely for the first 26 columns, A through Z:

=CHAR(COLUMN()+64)

This works because the letters A through Z use character codes 65 through 90. When COLUMN returns a value for columns A through Z (1 through 26), this can be added to 64 to get the letters of those columns, 65 through 90.

Of course, this solution won't work if you want to know the letter designations of columns beyond Z. Since a column in Excel can have up to three digits (Excel can use columns up through XFD), a different approach to finding the column letters is in order:

=LEFT(ADDRESS(1,COLUMN(),4),LEN(ADDRESS(1,COLUMN(),4))-1)

The ADDRESS function returns the address of a specific cell. In this case, it returns the address for the cell in the first row of the current column. Thus, if the formula is in cell BF27, it returns BF1. The formula uses the LEFT function to return the correct number of left-most characters in the address, minus the number 1 for the row.

An even shorter version of the formula relies upon the SUBSTITUTE function instead of the LEFT function:

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

Of course, you can also use a macro-based solution, if you want to. The follow macro will work with one, two, or three character columns:

Function AlphaCol(c As Range) As String
    Dim sTemp As String
    Dim ad1 As String

    ad1 = c.Address
    sTemp = Mid(ad1, InStr(ad1, "$") + 1, InStr(2, ad1, "$") - 2)
    AlphaCol = sTemp
End Function

The macro is a user-defined function, which means that you can use it in your worksheets by simply adding this to any cell:

=AlphaCol(J12)

The cell referenced in the function call is a cell (any cell) within the column whose letter you want to know. The function finds that address for that cell and strips out everything except the column designation. A text string is returned, consisting of the column designation.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9240) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Alphabetic Column Designation.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Viewing Multiple Pages

If you have a large monitor, you can view more than one page at a time in Word. This is very handy when you want to ...

Discover More

Setting Your Default Document Directory

Word allows you to specify where it should start looking for your documents. This setting can come in handy if you store your ...

Discover More

Saving in Multiple Locations

Need to save a workbook in more than one location? Here's a handy macro that can save your workbook in lots of different ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Pulling Formulas from a Worksheet

The formulas in your worksheet can be displayed (instead of formula results) by a simple configuration change. You can then ...

Discover More

Ignoring Case in a Comparison

Do you want Excel to take the case of your text into account when it does comparisons in a formula? The IF statement ignores ...

Discover More

Totaling Across Worksheets

Want to sum the values in the same cell on a range of worksheets? It's not as easy as summing a range on the same worksheet, ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 - 1?

2015-10-24 04:03:22

Pramod KN

Hai,

Actulally my kid she asking me to convert numbers in to words Ie 1=One,2=Two and so on.,,,, plz tell how to this in Excel.....


2014-02-27 16:35:55

Tom

Sorry, I'm not a programmer, just a script kiddie at best.

I am trying to create a macro to be used on a button click. When the users clicks the button I would like it to read a group of cells above and then paste the values of those cells elsewhere in the same column as the button. I know how to get the column number but what I am trying to figure out is how do I apply that to the range to use that value to specify the range. I know the coding is incorrect, but maybe this will explain what I mean:

Range("Column(ref)&80:Column(ref)&120").Select

Where ref=Button1.TopLeftCell.Column

Normally it would read Range("X80:X140").Select

Basically I'm trying to make it where I can programmatically change "X" based on the column the button is in.

How would this be accomplished?

Thanks much


2013-12-23 05:18:12

Michael (Micky) Avidan

@Rudra,
With your permission I have one question and one statment:
1) What benefit did you find using your formula over the: SUBSTITUTE formula ?
2) I call it "A waste of ink" (No offence).
*****************************
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2014)
ISRAEL


2013-12-23 01:53:21

Rudra

I would use this formula
=LEFT(ADDRESS(ROW(),COLUMN(),2),FIND("$",ADDRESS(ROW(),COLUMN(),2))-1)


2013-12-21 07:19:11

Michael (Micky) Avidan

I couldn't find any practical use for the suggested macro.
If one knows(!) the column's letter why should he use the UDF to retrieve something he is already aware of !?
An alternative UDF can be the listed below which is a little more sophisticated - because it DOES not require any argument and will return the column letter(s) in which it was typed.
=Column2()
If one needs the column letter(s) by "offsetting" 25 columns from column "H" (this is my favorite No. 8 column) then he may add the optional(!) argument like:
=Column2(8+25)
****************************************
Function Column2(Optional num As Variant) As String
Application.Volatile
If IsMissing(num) Then num = Application.Caller.Column
Column2 = Application.Substitute(Cells(1, num).Address(RowAbsolute:=0,
ColumnAbsolute:=0), "1", "")
End Function
****************************************
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2014)
ISRAEL


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.