The Union Function

Available in Sets.xla, a Microsoft© Excel add-in.
Click "Union",or scroll this page for Union examples.
Click on another function in the browser window to read about it.
Click a function.

Difference Right Associative Difference Disjoint Union Intersection MakeList MakeSet MatrixToList NMakeList PowerSet SymmetricDifference Union

The Union Function

The Union function returns a set.
The function can be called in one of two ways.
  1. From the function browser, above.
  2. Typing the function into directly into a cell.

Examples

In these examples, function outputs are colored red.
C1 = Union(A1:B1)
C2 = Union(A1:B2)
A3 = Union(A1:A2)
C3 = Union(A1:B3)
D3 = Union(WVName), where WVName = (A1,A4,B4,C4).
D4 = Union(A1,A4,B4,C4) produces an error.
  A B C D
1 1,2,3 {1,2,3},1 {1,2,3,{1,2,3}}  
2 1,2 1,{2} {1,2,3,{1,2,3},{2}}  
3 {1,2,3} {1,2},3 {1,2,3,{1,2,3},{1,2},{2}} {1,2,3,{1}}
4 1 {1},1 {1},2,1 #VALUE

Rules for Selections

Noncontigous cells may be unioned by reference to a workbook variable.
Cells A1,A4,B4,C4 are assigned the workbook variable name, "WVName".
See cells D3 and D4, above.


Created on ... December 30, 2001