Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function that will look at letter in a column and return a number locasciok1 Excel Worksheet Functions 4 November 11th 09 06:31 AM
Column() to return a letter instead of a number? cKBoy Excel Worksheet Functions 16 February 17th 06 04:50 AM
Return Current Column Letter and Row Number Carroll[_2_] Excel Programming 5 June 23rd 05 03:37 PM
column header changed from letter to number, how return to letter Ron Excel Discussion (Misc queries) 2 May 9th 05 08:34 PM
How to return the row number or column letter as a variable? Gerrit van Stempvoort Excel Programming 4 May 1st 04 10:39 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"