Union Method

See Also         Example         Applies To

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

Syntax

expression.Union(Range1, Range2)

expression   An expression that returns a Spreadsheet object.

Range1   Required Range object.

Range2   Required Range object.

Remarks

The Union 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.