Try this:
Dim LastRow as Double
Dim LastCol as Double
LastRow = Cells(Rows.Count,"A").End(xlUp).Row
LastCol = Cells(1,Columns.Count).End(xlToLeft).Column
Range(Cells(1,"A"),Cells(LastRow,LastCol)).Select
If you want to look cool this one line does the above also, if you have no blank rows or columns in your range of data.
Cells(1,"A").CurrentRegion.Select
Here is a way to test what excel thinks the CurrentRegion is. Click on a cell and press Ctrl+A. This shortcut will select the CurrentRegion from that cell.
Bookmarks