# Union and Intersection of Excel ranges

In mathematics, the term Union is used to mention all the elements which are in either sets. Similarly, the term Intersection is used to mention the elements which are available common in both sets.

For example, Consider A = (10, 20, 30) and B = (30, 40, 50). Then, A Union B = 10, 20, 30, 40, 50 and A Intersection B = 30.

Same concept of Union and Intersection is applied for Excel Ranges also. Please refer following sections to understand Union and Intersection of Excel Ranges.

## Union of Excel ranges

Comma (,) reference operator is used to create the Union of Excel Ranges.

Following two images show two different Ranges. First image shows Excel Range A1:C3 and second image shows Excel Range B2:D4.

To explain the concept of Union and Intersection in Excel Ranges, I am using the Excel function SUM. Following image shows the SUM function with Union of two Excel Ranges, with comma (,) as the reference operator.

The result of SUM function using Union reference operator is shown below. From the result, you can understand that the SUM function gives the sum of the numeric values in all the Cells of the two Ranges (which is Union, as explained above).

## Intersection of Excel ranges

Following image shows the SUM function with Intersection of two Ranges, using space as the reference operator.

The result of SUM function using Intersection reference operator is shown below. From the result, you can understand that the SUM function gives the sum of the numeric values in the Cells which are common in two Ranges (which is Intersection, as explained above). The Cells which are common in both the Ranges are B2, C2, B3 and C3.