Excel - Return column alphabet from column number
Is there some function in Excel (VBA) that will get me the column alphabet if I provide the column number, or do I have to write one. I ask because I know that there is, yet I recall I wrote this functionality for the previous application, and I don't want to:
(1) Reuse it, if there's something in-built
(2) Re-invent the wheel
Help!
PS: I'm looking for something like:
Code:
Function GetAlphabet(ByVal ColumnNumber as Long) as String
which if I call must say:
Output: "A"
Re: Excel - Return column alphabet from column number
Another way:
If you only need to return the letter number of columns A-Z in an Excel 2003 Spreadsheet:
Use the CHAR() function:
=char(64+column())
Let me know if this helps :)
Re: Excel - Return column alphabet from column number
columns(1).address will return $A:$A