Use column number in a range instead of column letter

  • Thread starter Thread starter Greg Snidow
  • Start date Start date
G

Greg Snidow

Greetings. How can I use a column number in a range, instead of column
letters? For example, I have Range("B3:B7").Select. I want to copy and
paste this range in another place in the worksheet, then run some other code,
and then copy Range("C3:C7") and run some code, all the way up to
Range("M3:M7"). I would like to be able to use a variable for the column
index, then just increment it by 1 at the end of the loop. Any ideas? Thank
you.
 
You could work with offsets from the original range instead of specifying
column numbers...

For X = 0 To 11
Range("B3:B7").Offset(0, X).Select
' Do something with the selection
Next
 
Back
Top