View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default VBA range selection question

Can you "more concise" this one?

Function GetColNum(myColumn As String) As Long
GetColNum = Columns(myColumn & ":" & myColumn).Column
End Function


The Columns property does not require the repeated, colon delimited string
like the Range does...

Function GetColNum(myColumn As String) As Long
GetColNum = Columns(myColumn).Column
End Function

Rick Rothstein (MVP - Excel)