MAKEARRAY Function
Builds a grid of any size, filling each cell with a LAMBDA based on its row and column.
Category
Logical
Available in
Microsoft 365, Excel 2024
Returns
A spilled array of the size you ask for
Overview
MAKEARRAY creates an array from scratch. You say how many rows and columns, and your LAMBDA decides what goes in each position.
The LAMBDA receives the row number and column number, so the content can depend on where it sits — ideal for tables, labels and test data.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| rows | Yes | How many rows to create. |
| cols | Yes | How many columns to create. |
| lambda | Yes | A LAMBDA with two parameters, row and column, returning the value for that position. |
Examples
Example 1 — A multiplication grid
Three rows by four columns, each cell row × column.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | 1 | 2 | 3 | 4 |
| 2 | 2 | 4 | 6 | 8 |
| 3 | 3 | 6 | 9 | 12 |
Example 2 — Seat labels
Rows A–C, seats 1–5.
Spills A1 to A5 on the first row, B1 to B5 on the second and C1 to C5 on the third. CHAR(65) is the letter A.
Example 3 — Practice data
Fill 10 rows × 3 columns with random whole numbers.
Common mistakes
- #VALUE! errors. rows or cols is zero, negative or not a number.
- #SPILL! errors. Cells in the way of the result. Clear the area.
Notes
- For simple number sequences, SEQUENCE is quicker.
- Related functions: SEQUENCE, MAP, LAMBDA, RANDARRAY.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.