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