![]() |
VBA range from cell value
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? |
VBA range from cell value
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. In article , "Alex" wrote: 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? |
All times are GMT +1. The time now is 07:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com