Select all cells with data

Here you go:

Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

Or if you don't necessarily start at A1:

Range("C6").Select  ' Select a cell that you know you populated'
Selection.End(xlUp).Select
Selection.End(xlToLeft).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

You might also want to look at the CurrentRegion property. This will select a contiguous range that is bounded by empty cells, so might be a more elegant way of doing this, depending on the format of your worksheet.

For example:

Range("A1").CurrentRegion.Select

Tags:

Excel

Vba