UsedRange Property

Microsoft Excel Visual Basic

Returns a Range object that represents the used range on the specified worksheet. Read-only.

Example

This example selects the used range on Sheet1.

Worksheets("Sheet1").Activate
ActiveSheet.UsedRange.Select