VBA range from cell value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro in which I have the line:
Range (A1:I8).select

The problem is that the row number in Col. I varies.

I would like to get the range from cell L2 in my worksheet and continue the rest of the macro. I can make the proper range in cell L2 I just need to know how to make visual basic look at that cell to determine the range it selects.

Can anyone help me?
 
If you're saying you create a text reference to the range (e.g.,
"A1:I100") in cell L2, then use

Range(Range("L2").Text).Select

But I'd guess it would be more efficient to calculate the row number in
VBA directly. Post back explaining how you come up with the method if
you're interested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top