Convert Excel Column Name to Number

Posted on Thu, Aug 6 2015 in Bob's Journal

Column Name:

An Explanation:

The other day I downloaded a database table, with a ridiculous number of columns, as a CSV spreadsheet. I wanted to write a program to isolate and clean up a couple of its columns. To do this I needed to know the column numbers. For example, that "About Me" is the 78th column. When I opened up the spreadsheet in LibreOffice I didn't find the column number. Instead, the columns had names like "AG" and "BN". I get why it makes sense to use numbers for rows and letters for columns, but I can't easily tell a program to get the AOth element of an array.

I did a web search to see if someone had a nice converter online that would tell me which number to use for the column names, but my search turned up nothing. I hope to correct that for future searchers of the internet. Enjoy.

P.S. - This converter is also handy if you want to know the position of various letters in the alphabet. Just replace the word "column" with the word "letter".