Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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 July 7, 2018)

6

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 following 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.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the ExcelTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9240) applies to Microsoft Excel 2007, 2010, 2013, and 2016. 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

Using Different Shapes in WordArt

You can apply different shapes in WordArt to create different effects.

Discover More

Searching for Non-Black Text

Searching for text having (or not having) specific formatting is generally pretty easy. It is more difficult to search ...

Discover More

Working in Feet and Inches

Your chosen occupation may require that you work with linear distances in feet and inches. Excel can do this, to a ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Understanding Scope for Named Ranges

When you add a named range to a worksheet, you can specify if you want that named range to apply to the workbook or only ...

Discover More

Summing Absolute Values

You can easily sum a series of values in Excel, but it is not so easy to sum the absolute values of each value in a ...

Discover More

Using Named Formulas Across Workbooks

You can use the naming capabilities of Excel to name both ranges and formulas. Accessing that named information in a ...

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 5 + 2?

2018-02-16 12:47:27

Courtheyn Joel

Below I inform you about the functions I created to convert Col Nrs <-> Col letters

Public Function ConvKolNrtoLetter(ByVal KNr As Integer) As String
Dim Hulp As String
On Error GoTo Fout1:
Hulp =ActiveWorkbook.Worksheets(1).Cells(1, KNr).Address(RowAbsolute = False, ColumnAbsolute = False, ReferenceStyle = xlA1)
ConvKolNrtoLetter = Left(Hulp, Len(Hulp) - 1)
Exit Function

Fout1:
MsgBox "Opgegeven kolomnr kan niet geconverteerd worden naar letter."
End Function

Function ConvKolLtoNr(ByVal L As String) As Integer
'testen op eventuele fout
On Error GoTo Fout1:
ConvKolLtoNr = ActiveWorkbook.Worksheets(1).Range(L & "1").Column
Exit Function
Fout1:
MsgBox "Opgegeven kolomletternaam kan niet geconverteerd worden naar integer"
End Function


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.