Get 2nd parameter of ROW reference to use contents of a specific cell
Get 2nd parameter of ROW reference to use contents of a specific cell
(OP)
In VBA how do I enhance this line in a macro to use the contents of cell A1 as the end of the range?
Current:
Rows("2:200").Select
Desired:
Rows("2:A1").Select
I have guessed at various syntax and cannot get it to work.
Thanks very much.
Current:
Rows("2:200").Select
Desired:
Rows("2:A1").Select
I have guessed at various syntax and cannot get it to work.
Thanks very much.





RE: Get 2nd parameter of ROW reference to use contents of a specific cell
temp = Range("A1").Value
Rows("2:" & temp).Select
Mutt.
RE: Get 2nd parameter of ROW reference to use contents of a specific cell
Range([A2], Cells([A1].Value, 1)).EntireRow.Select
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.