The MakeList Function

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

The MakeList function returns a simple list to a cell.
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 list?

A simple list is made of one or more items without brackets.
(No "{" or "}" are allowed in a simple list.)
Items in a list are separated by other items by a ",".
Examples
Cell Contains Simple List?
1 Yes
1,2,a,b Yes
{1,2,a,b} No

Examples

Two-Part Example
A1 B1 MakeList(A1:B1)
1,2,3,4,5 1,2,3 1,2,3,4,5,1,2,3


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

Rules for Selections

In the two-part and three-part examples, cells selected for the list are contiguous.
Noncontigous cells may converted to a list 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
=MakeList(WVName) {1,2,3,5}
=MakeList(A1,A3) #VALUE!

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


Created on ... December 27, 2001