RectUnion Method

Microsoft Office Web Components Object Model

RectUnion Method

       

Returns a Range object that represents the smallest range of cells that includes the union of the specified ranges.

expression.RectUnion(Range1, Range2)

expression   Required. An expression that returns a Spreadsheet object.

Range1  Required Range.

Range2  Required Range.

Remarks

This method always returns a rectangular range. For example, if you specify A1:A5 and F1:F10, the return value is the rectangular range A1:F10. Also, you cannot use this method to create a range containing noncontiguous areas.