0

Hi there I'm looking for a bit of code which selects the range from cell A2 across till column AD, and then down till the last used row

Community
  • 1
  • 1
chandu
  • 95
  • 1
  • 4
  • 12
  • 1
    Have you tried `UsedRange` and `Offset`. A dynamic named range will do the trick too. – cyboashu Jul 08 '16 at 16:16
  • 1
    see here for methods on finding the last row: http://stackoverflow.com/questions/11169445/error-in-finding-last-used-cell-in-vba – Scott Craner Jul 08 '16 at 16:18

1 Answers1

0

You can use below code.

Sub my_code()

    lastrow = Range("A10000").End(xlUp).Row
    Range(Cells(2, 1), Cells(lastrow, 30)).Select

End Sub
Abhijeet
  • 269
  • 1
  • 4
  • 12