View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Michael Michael is offline
external usenet poster
 
Posts: 791
Default problem selecting a range using variables

This will select A1:B2

Sub One()
row1 = 1
row2 = 2
col1 = 1
col2 = 2


Range(Cells(row1, col1), Cells(row2, col2)).Select



End Sub


"cass calculator" wrote:

yeah, sorry that last & was my mistake. when I use the line below, it
selects the entire row A and B. I just want to select A1:B2 though.

Range(Cells(row_1, col_1), Cells(row_2, col_2)).Select

Any help on just selecting a given range and not the entire row?

Thanks,

Joshua