VBA range selection question
Thanks Rick
Can you "more concise" this one?
Function GetColNum(myColumn As String) As Long
GetColNum = Columns(myColumn & ":" & myColumn).Column
End Function
Gord
On Sun, 8 May 2011 11:34:42 -0400, "Rick Rothstein"
wrote:
Note also the addition of the GetColLet UDF
Function GetColLet(ColNumber As Integer) As String
GetColLet = Left(Cells(1, ColNumber).Address(False, False), _
1 - (ColNumber 26))
End Function
Here is a more concise version of your GetColLet function which the OP might
want to consider using...
Function GetColLet(ColNumber As Long) As String
GetColLet = Split(Cells(1, ColNumber).Address, "$")(1)
End Function
Rick Rothstein (MVP - Excel)
|