Union and Intersect Methods in Excel VBA

The Union method in Excel VBA returns a Range object that represents the union of two or more ranges (borders below for illustration only).
Code line:
Union(Range("B2:C7") Range("C6:F8")).SelectResult:
Note: the Union method doesn't return the mathematical union (cell C6 and cell C7 are included twice).
The Intersect method in Excel VBA returns a Range object that represents the intersection of two or more ranges (borders below for illustration only).
Code line:
Intersect(Range("B2:C7") Range("C6:F8")).SelectResult:
Written by
Jason Howie
Founder, FormulasHQ
A formula nerd with a passion for numbers and equations. Writes about Excel, Google Sheets, VBA, regex, and Salesforce formulas — for people who spend their day in spreadsheets.