Convert column # to the letter of the alphabet
Hi Jim,
try
Debug.Print "# " + Left(Cells(1, uCol).Address(rowabsolute:=True, columnabsolute:=False), InStr(1, Cells(1,
uCol).Address(rowabsolute:=True, columnabsolute:=False), "$", vbTextCompare) - 1)
Maybe a little bit tricky ;-)
Regards,
billy
"JimRich" schrieb im Newsbeitrag ...
In the following code the uCol value is a number, I need the actual column
letter. Is there an easy way to convert the # to the correct column letter.
I could us an array or a function with a select case but I have at least 180
columns that have to be done. The code is used to determine the location of
a particular Agent's sales data for poping up a chart using that data.
uAdd = ActiveWindow.RangeSelection.Address
uCol = Range(uAdd).Column
Thanks!
|