Make Set

# The MakeSet Function

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

## The MakeSet Function

The MakeSet function returns a simple 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.

## What is a simple set?

A simple set is a simple list enclosed in brackets.
Each item in the simple list is unique.
Examples
Cell Contains Simple Set?
{1} Yes
{1,2,a,b} Yes
{1,2,a,b,2} No
{{1,2,a,b}} No

## Examples

Two-Part Example
A1 B1 =MakeSet(A1:B1)
1,2,3,4,5 1,2,3 {1,2,3,4,5}

Three-Part Example
Cell Contents
A1 1,2,3,4,5
A2 1,2,3
A3 4
=MakeSet(A1:A3) {1,2,3,4,5}

## Rules for Selections

In the two-part and three-part examples, cells selected for differencing are contiguous.
Noncontigous cells may be differenced by reference to a workbook variable.
Cells A1 and A3 are assigned the workbook variable name, "WVName".

Workbook Variable Name Example
Cell Contents
A1 1,2,3,4,5
A2 1,2,3
A3 4
=Difference(WVName) {1,2,3,5}
=Difference(A1,A3) #VALUE!

If the cells are referenced directly, a #VALUE results.

Created on ... December 27, 2001