ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   column command to return letter (https://www.excelbanter.com/excel-programming/358176-column-command-return-letter.html)

Gary Keramidas

column command to return letter
 
can somebody help me out? i can't remember the columns command i used or where
i used it, to return the column letter of a column.

it's not a function, it doesn't return the address, or use the left property or
anything like that, i think it was just using the columns property.

hopefully i explained it well enough. it was simple when it came to me, but i
can't remember it for the life of me.

--


Gary




Bob Phillips[_6_]

column command to return letter
 
Is this what you saw

On Error Resume Next
sColumn = Split(Columns(Col).Address(, False), ":")(1)
On Error GoTo 0


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
can somebody help me out? i can't remember the columns command i used or

where
i used it, to return the column letter of a column.

it's not a function, it doesn't return the address, or use the left

property or
anything like that, i think it was just using the columns property.

hopefully i explained it well enough. it was simple when it came to me,

but i
can't remember it for the life of me.

--


Gary






Gary Keramidas

column command to return letter
 
no bob, it wasn't any code.
i know this isn't close but
it was something like this in the immediate window

?columns.name.address

and it returned just the column letter, no $ no number
--


Gary


"Bob Phillips" wrote in message
...
Is this what you saw

On Error Resume Next
sColumn = Split(Columns(Col).Address(, False), ":")(1)
On Error GoTo 0


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
can somebody help me out? i can't remember the columns command i used or

where
i used it, to return the column letter of a column.

it's not a function, it doesn't return the address, or use the left

property or
anything like that, i think it was just using the columns property.

hopefully i explained it well enough. it was simple when it came to me,

but i
can't remember it for the life of me.

--


Gary








Gary Keramidas

column command to return letter
 
nobody has any idea how i did this? i can't blame you, neither do i at the
moment. hopefully it will come back to me.

--


Gary


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
can somebody help me out? i can't remember the columns command i used or
where i used it, to return the column letter of a column.

it's not a function, it doesn't return the address, or use the left property
or anything like that, i think it was just using the columns property.

hopefully i explained it well enough. it was simple when it came to me, but i
can't remember it for the life of me.

--


Gary






bhofsetz[_127_]

column command to return letter
 

Gary,
Did you ever remember how to do find the column letter? I'm
trying to do the same thing and can't figure it out either.

I'd like to return the column letter from a cell reference

i.e. for cell(5,y)

It would return L if y = 13
or D if y = 4

etc.

Does anyone know how to do this?

Thanks


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=530389


Gary Keramidas

column command to return letter
 
i have not.

--


Gary


"bhofsetz" wrote in
message ...

Gary,
Did you ever remember how to do find the column letter? I'm
trying to do the same thing and can't figure it out either.

I'd like to return the column letter from a cell reference

i.e. for cell(5,y)

It would return L if y = 13
or D if y = 4

etc.

Does anyone know how to do this?

Thanks


--
bhofsetz
------------------------------------------------------------------------
bhofsetz's Profile:
http://www.excelforum.com/member.php...o&userid=18807
View this thread: http://www.excelforum.com/showthread...hreadid=530389




bhofsetz[_128_]

column command to return letter
 

If you use

cells(5,y).Address

it will return to you

$L$5 when y = 12

I know this isn't exactly what you are after but by using a mid comman
you can get just the letter out.

mid(cells(5,y),2,1).Address

will return

L when y = 12

this would have to be modified if you know that you will be dealin
with more than 26 columns.

Not the method you were looking for but a possible work around

--
bhofset
-----------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...fo&userid=1880
View this thread: http://www.excelforum.com/showthread.php?threadid=53038



All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com