+ Reply to Thread
Results 1 to 7 of 7

column command to return letter

  1. #1
    Gary Keramidas
    Guest

    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. #2
    Bob Phillips
    Guest

    Re: 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
    news:%[email protected]...
    > 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. #3
    Gary Keramidas
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    > news:%[email protected]...
    >> 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. #4
    Gary Keramidas
    Guest

    Re: 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
    news:%[email protected]...
    > 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
    >
    >
    >




  5. #5
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    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

  6. #6
    Gary Keramidas
    Guest

    Re: column command to return letter

    i have not.

    --


    Gary


    "bhofsetz" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  7. #7
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    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 command 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 dealing with more than 26 columns.

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1