View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Selecting a range using a column number reference

like this

Range(Cells(2, c + 3), Cells(50, c + 4)).Select

--


Gary


"PCLIVE" wrote in message
...
That's what I was looking for. I was close while I was waiting for a
reply.
Another quesiton.

How could I select a range of cells the same way.
I've tried this which didn't work.

Range(Cells(2, c + 3)) & ":" & (Cells(50, c + 4)).Select

Thanks again,
Paul

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
replace with 142+2 your variable in the formula

Cells(2, 142 + 2).Select

--


Gary


"PCLIVE" wrote in message
...
I know this code isn't correct, but it's what I've got so far.

Range((c + 2) & "2").Select

"c" is a variable in which was set in previous code using:
c = cell.Column

I'm trying to write the code so that it will select a range that will
match the column set by the variable (in this case is column 142 + 2,
and row 2. I believe this is somewhere around EL2. How can I change the
code so that it will select the range using the column number reference
instead of the letter reference?

Thanks,
Paul