Selecting cells

  • Thread starter Thread starter PaulSinki
  • Start date Start date
P

PaulSinki

I've got a question that is really simple, but I just can't figure out
how to get the syntax right.
I want the macro to pick a certain column, which is identified from
user input, and then select a range below that to run a loop through.
This is the current code:

Range("o7:r7").Find(What:=MyValue3).Activate
Range("d9:d360").Select

(MyValue3 is defined by the user and is a week number found in the
range O7 to R7).
What I want to replace is the Range d9:d360 with a reference that will
select from rows 9 to 360 no matter what column it's in.
I tried Range("[RC]:[RC360]") to no avail.
What am I doing wrong, and what will make this work?
Thanks,
a very frustrated beginner....
 
Is this what you're trying to do?

Dim intC As Integer

Range("o7:r7").Find(What:=MyValue3).Activate
intC = ActiveCell.Column
Range(Cells(9, intC), Cells(360, intC)).Select


HTH
Paul
 
Back
Top