Worksheet.UsedRange Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a Range object that represents all the cells that have contained a value at any time.
public:
property Microsoft::Office::Interop::Excel::Range ^ UsedRange { Microsoft::Office::Interop::Excel::Range ^ get(); };
public Microsoft.Office.Interop.Excel.Range UsedRange { get; }
member this.UsedRange : Microsoft.Office.Interop.Excel.Range
Public ReadOnly Property UsedRange As Range
Property Value
A Range object that represents all the cells that have contained a value at any time.
Remarks
A used range includes any cell that has ever been used. For example, if cell A1 contains a value, and then you delete the value, then cell A1 is considered used. In this case, the UsedRange property will return a range that includes cell A1.