How to get the size of a range in Excel How to get the size of a range in Excel vba vba

How to get the size of a range in Excel


The overall dimensions of a range are in its Width and Height properties.

Dim r As RangeSet r = ActiveSheet.Range("A4:H12")Debug.Print r.WidthDebug.Print r.Height


The Range object has both width and height properties, which are measured in points.