Results 1 to 20 of 24

Thread: get column letter

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    Quote Originally Posted by Killian
    If you really want the column letter, I think the best way is to use the column index property relative to the ASCII character code. Cap A is 65 so:MsgBox
    Chr(ActiveCell.Column + 64)
    What about double letters?

    Function ColumnLetter(Col As Long)
    Dim sColumn As String
        On Error Resume Next
            sColumn = Split(Columns(Col).Address(, False), ":")(1)
        On Error GoTo 0
        ColumnLetter = sColumn
    End Function
    Last edited by Aussiebear; 04-08-2023 at 05:08 AM. Reason: Adjusted the code tags
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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