B BB Ivan Jan 28, 2009 #1 In a procedure, how can I get the letter of a referenced column rather than it's number?
B BB Ivan Jan 28, 2009 #3 Thanks. I was hoping there was a property not listed in the Help Files, but this works great.
G Gord Dibben Jan 28, 2009 #4 In a procedure, call this function. Function GetColLet(ColNumber As Integer) As String GetColLet = Left(Cells(1, ColNumber).Address(False, False), _ 1 - (ColNumber > 26)) End Function Sub test() MsgBox "this is column " & GetColLet(ActiveCell.Column) End Sub Gord Dibben MS Excel MVP
In a procedure, call this function. Function GetColLet(ColNumber As Integer) As String GetColLet = Left(Cells(1, ColNumber).Address(False, False), _ 1 - (ColNumber > 26)) End Function Sub test() MsgBox "this is column " & GetColLet(ActiveCell.Column) End Sub Gord Dibben MS Excel MVP
M MyVeryOwnSelf Jan 29, 2009 #5 In a procedure, how can I get the letter of a referenced column rather than it's number? Click to expand... One way: =CHAR(COLUMN(A1)+64)
In a procedure, how can I get the letter of a referenced column rather than it's number? Click to expand... One way: =CHAR(COLUMN(A1)+64)
P Pete_UK Jan 29, 2009 #6 Only works up to column Z. Pete One way: =CHAR(COLUMN(A1)+64) Click to expand...
M MyVeryOwnSelf Jan 30, 2009 #7 Only works up to column Z. Click to expand... Right... my bad. (I cancelled the article after posting it, but apparently it escaped into the world anyhow. Next time, I'll post a retraction too.)
Only works up to column Z. Click to expand... Right... my bad. (I cancelled the article after posting it, but apparently it escaped into the world anyhow. Next time, I'll post a retraction too.)