Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this...
uAdd = ActiveWindow.RangeSelection.Address(1, 0) uCol = Split(uAdd, "$")(0) -- Rick (MVP - Excel) "JimRich" wrote in message ... 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! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually, here is my same method of approach but where you can leave the
first line of code exactly as you originally posted it... uAdd = ActiveWindow.RangeSelection.Address uCol = Split(uAdd, "$")(1) -- Rick (MVP - Excel) "Rick Rothstein" wrote in message ... Try this... uAdd = ActiveWindow.RangeSelection.Address(1, 0) uCol = Split(uAdd, "$")(0) -- Rick (MVP - Excel) "JimRich" wrote in message ... 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! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do you mean
uAdd = ActiveWindow.RangeSelection.Address uCol = Replace(Cells(1, Range(uAdd).Column).Address(False, False), "1", "") If this post helps click Yes --------------- Jacob Skaria "JimRich" wrote: 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! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding a number to a letter of the alphabet to get a letter | Excel Worksheet Functions | |||
convert column number to letter | Excel Programming | |||
convert column number to letter | Excel Programming | |||
convert column number to letter | Excel Programming | |||
check for alphabet in datalabel and then superscript that letter | Excel Programming |