Article ID: 153318
Article Last Modified on 10/11/2006
Sub Convert_Column()
Dim MyColumn As String, Here As String
' Get the address of the active cell in the current selection
Here = ActiveCell.Address
' Because .Address is $<columnletter>$<rownumber>, drop the first
' character and the characters after the column letter(s).
MyColumn = Mid(Here, InStr(Here, "$") + 1, InStr(2, Here, "$") - 2)
' Show the answer.
MsgBox MyColumn
End Sub
If you run this macro from a worksheet, a message box displays the active
cell's column letter.
Additional query words: 8.00 convert r1c1 a1 howto how to XL98 XL97 XL7 XL5 example
Keywords: kbdtacode kbhowto kbprogramming KB153318