View Single Post
  #14   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

Another way:

GetColNum = Cells(1, myColumn).Column


The row number is optional, so you can save a character...

GetColNum = Cells(, myColumn).Column

This makes the statement the same length as the one I just posted a few
minutes ago, namely...

GetColNum = Columns(myColumn).Column

Rick Rothstein (MVP - Excel)