Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to convert column letter to number or vice versa in Excel?

This article, I will talk about how to convert column letter to column number or convert column number to letter. Such as, convert column letter AA to the number 27, or convert column number 100 to letter CV. To get the solution with following methods.

Convert column letter to number or vice versa with formulas

Convert column letter to number or vice versa with User Defined Function


arrow blue right bubble Convert column letter to number or vice versa with formulas


To convert the column letter or label to number or vice versa, the below formulas may help you, please do as this:

Convert column letter to column number:

Please enter this formula: =COLUMN(INDIRECT("AB1")) into a blank cell where you want to locate the converted result, and then press Enter key to get the column number:

doc convert column label to number 1

Note: In the above formula, AB is the column letter that you want to get the column number based on, you can change it to your need.

Convert column number to column letter:

Please type this formula: =SUBSTITUTE(ADDRESS(1,200,4),1,"") into a blank cell to get the result, and then press Enter to get the column letter as follows:

doc convert column label to number 2

Note: In the above formula, the red number 200 is the column number that you want to convert to column letter, you can change it to your need.


arrow blue right bubble Convert column letter to number or vice versa with User Defined Function

Except the formulas, here, I can also introduce the User Defined Function to deal with this task.

Convert column letter to column number:

1. Hold down the ALT + F11 keys, then it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: convert column letter to column number:

Public Function ToColNum(ColN)
    ToColNum = Range(ColN & 1).Column
End Function

3. Then save and close this code, go back to the worksheet, and enter this formula: =Tocolnum("VV") (VV is the column letter that you want to convert number. ) into a blank cell, and press Enter key to get the column number, see screenshot:

doc convert column label to number 3

Convert column number to column letter:

1. Hold down the ALT + F11 keys, then it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: convert column number to column letter:

Public Function ToColletter(Collet)
    ToColletter = Split(Cells(1, Collet).Address, "$")(1)
End Function

3. Then save and close this code, go back to the worksheet, and enter this formula: =ToColletter(50) (50 is the column number that you want to convert to letter. ) into a blank cell, and press Enter key to get the column number, see screenshot:

doc convert column label to number 4


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Albert · 2 months ago
    thank you so much!!!...your formula to create the column letter to number really helps me a lot.
  • To post as a guest, your comment is unpublished.
    petr · 6 months ago
    Function ToColletter(Collet) works as volatile function. If something changes anywhere in the sheet. It recalculate everywhere. In my case it makes 15 mil calculations and slowdown the calculation. Do you know how to fix it, if I dont want set application.calculation to manual and than back?
  • To post as a guest, your comment is unpublished.
    diego · 7 months ago
    hola, cuando pego la formula = SUSTITUIR (DIRECCIÓN (1,200,4), 1, "") en una celda no hace nada, solo devuelve la formula, ya sea con 200 o cualquier otro numero
  • To post as a guest, your comment is unpublished.
    Better · 10 months ago
    =CHAR(COLUMN( )+64)
  • To post as a guest, your comment is unpublished.
    J · 1 years ago
    For so long I've used R1C1 cell referencing because I didn't know about the =SUBSTITUTE(ADDRESS(1,number,4),1,"") solution. Thank you!!