The Set of All Subsets of a Set

The PowerSet function

Available in Sets.xla, a Microsoft© Excel add-in.
Click "PowerSet",or scroll this page for PowerSet 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 PowerSet Function

The PowerSet function returns a set from a range of cells.
The range of cells is called the argument of the function.
The PowerSet function can be called in one of two ways.
  1. From the function browser, above.
  2. Typing the function directly into a cell.

List Examples

In these examples, the contents of each cell in the argument is a simple list.

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


Three-Part Example
Cell Contents
A1 11
A2 12
A3 13
=PowerSet(A1:A3) {{},{11},{12},{11,12},{13},{11,13},{12,13},{11,12,13}}

Here is What is Going On

Every set which consists of every possible combination of elements which
occur at the shallowest level of nesting gets included as an element of the
powerset. Only sets which are subsets of the input set are included in the
powerset.

Set Example

In this example, each cell in the argument is treated as a set.
The contents of each cell are treated as elements.

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







Created on ... January 02, 2002