Knowledge.ToString()

# Excel Column Letter to Number Quick Reference

Here is a quick reference for Excel column letter to number mapping. Many times I needed to find the column number associated with a column letter in order to use it in Excel Macro. For a lazy developer like me, It is very time consuming ðŸ˜‰ to use my Math skill to get the answer so I created this quick reference lookup for myself.

If you are looking for a specific column, click on the following links to jump to a specific list of columns

## Excel Columns ZA-ZZ

#### 29 responses to “Excel Column Letter to Number Quick Reference”

1. Yolanda Basson

How do I change the column names back to letters instead of numbers?

1 2 3 4 5
2
3
4
5

But want it to be

A B C D E
1
2
3
4
5

1. Vishal Monpara

Hi Yolanda,

You may have R1C1 Reference style enabled. That is the reason, it is showing all numbers. In order to change it, go to File menu > Options > Formulas tab > under “Working with Formulas” section, you will see “R1C1 Reference style” checked. Uncheck this box and you will get all your columns in alphabets.

Regards
Vishal Monpara

2. Thomas

Still the most useful reference, since manually computing it takes much longer. ðŸ™‚

3. Gilberto

Thank you!!

4. holibut

You can change column name to number by programming. The following is in Python:

“`
def getExcelColumnNumber(columnName):
# columnName as A, AA, ABC
columnLetters = list(columnName)
print(columnLetters)

columnValue = 0
lettersCount = len(columnLetters)
for i in range(lettersCount):
columnValue = columnValue + 26**(lettersCount -i-1) * (ord(columnLetters[i]) – 64)
# end for

return columnValue
# end def

# test

getExcelColumnNumber(‘AA’) # 27
getExcelColumnNumber(‘YA’) # 651
getExcelColumnNumber(‘ZZ’) # 702
“`

5. Scott

Thanks from New Zealand. ðŸ™‚

Thanks! What a timesaver. Just found this for the first after manually calculating the column numbers for VLOOKUP function.

7. Dee Roche

=column() in a column will render the column number

8. Mateja

or you can just make a simple script that takes an input (such as ABD, ABCDEFG, etc) and returns the #

s, o, l = input(), 0, list(‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’)

for i in range(len(s)):
o*=26
o+=l.index(s[i])+1

print(o)

9. Yoyo At The Beach

Thanks from the Cayman Islands for this!
You saved me a lot of time working on my vlookups âœŒâœŒâœŒ

10. Jonathan

Thank you for this! I’ve visited this page many times when working on VLOOKUPs. Total life saver.

11. Jameel Siddiq

brilliant job, I often need the reverse but your table gives me that option as I can just look up the other way

12. Dirk

Thank you, such a simple table but very, very helpful.

13. Stephen Allen

I agree that this is really useful. I have take the opportunity to extend the process to Column XFD – the last in my version of Excel.

A copy of the VB Code is available at https://www.linkedin.com/feed/update/urn:li:activity:6644160098514141186

14. Courtney

Thank you so much! This is so helpful ðŸ™‚

15. Oj Shrivastava

Or you can just make quick Mathematical formula based on the position of input.
eg.
ABC: 26*26*(A=1) + 26*(B=2) + (C=3) = 731.
CH: 26*(C=3) + (H=8) = 86.

1. VIPUL JHAVERI

very brilliant
thanks to share
vipul jhaveri

16. Martin

you should stop using vlookup and use xlookup. There you can just reference “CH” instead of 86

17. Tim

Thank you! I ran out of fingers trying to figure out how to reference Column CH in my VLOOKUP. ðŸ™‚
So simple and yet so useful–bless you, Mr. Monpara!

18. Vipul

Thank you. what a time saver

19. Nick

Thanks, it helped!

21. Ravinga

22. leonora

fabulous a real time saver thankyou!

23. Andrew Harichandran

Thank you, Mr. Vishal Monpara!

24. Natasha

Thank you so much for this. It’s such a simple thing, but it’s so very helpful.

25. Chris

Thank you that’s very useful. I use this list everyday at work.

26. Katie

Thank you! The formulas elsewhere online (eg “=COLUMN(INDIRECT(B5&”1″))”) work just fine, but imo it’s a bit more efficient to just use a list sometimes.

27. Abhilash Nagkat

Can you also provide the Column# for column till AAA or so?