-2

i want get the range from cell A1 to end of the cell which contains the data only.

I tried this few way still failed.

Example:

ActiveSheet.Range("A:A").Address

Range("A65536").End(xlUp).Row

regards, YY

Community
  • 1
  • 1
whywhy
  • 155
  • 1
  • 6
  • 13
  • Find the last row using [THIS](http://stackoverflow.com/questions/11169445/error-finding-last-used-cell-in-vba) and then construct your range :) – Siddharth Rout Feb 14 '14 at 07:30

1 Answers1

0

This should do the trick:

ActiveSheet.Range("A1", ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Address).Select
Netloh
  • 4,338
  • 4
  • 25
  • 38