Dragging a formula across hundreds of rows—or writing nested AND checks inside FILTER that break on array operations—slows down modern spreadsheet workflows. With MAP in Excel and its companion generator MAKEARRAY, you can transform every element across one or more ranges using a custom LAMBDA, or build a brand-new 2D grid from scratch in a single spilling formula.
Availability & Compatibility: Per the official MAP function documentation and MAKEARRAY function documentation, both functions are available in Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel for the web, Excel 2024, and Excel 2024 for Mac (plus Google Sheets). Older perpetual versions such as Excel 2021 and Excel 2019 do not support them and will display #NAME?.
Table of Contents
How MAP in Excel Works (Transform One or More Arrays)
MAP evaluates each value in one or more arrays through a LAMBDA function in Excel and returns a new spilled array with the exact same dimensions. Here is the syntax:
=MAP(array1, [array2, ...], LAMBDA(param1, [param2, ...], calculation))
- array1, [array2, …] (Required): One or more ranges or dynamic arrays to map cell-by-cell. All arrays must have matching dimensions.
- lambda (Required): Must be the final argument and must declare one parameter for every array passed in (for example, two parameters
sandcwhen mapping two columns).
Suppose your Practice sheet tracks six apparel orders in A6:D11 (Order ID, Size, Color, and Price). Because Excel’s AND function normally collapses an entire column into a single TRUE/FALSE instead of checking row-by-row, wrapping two columns inside MAP solves the problem cleanly. To flag every order that is both Large and Red from cell F6, enter:
=MAP(B6:B11, C6:C11, LAMBDA(s, c, AND(s="Large", c="Red")))
Even better, you can pass that exact MAP expression straight into the FILTER function in Excel to extract only matching rows dynamically: =FILTER(A6:D11, MAP(B6:B11, C6:C11, LAMBDA(s, c, AND(s="Large", c="Red")))). Need a conditional price discount? Map Column D alone to apply 15% off orders above $100: =MAP(D6:D11, LAMBDA(p, IF(p>100, p*0.85, p))).
How MAKEARRAY Works (Generate Custom 2D Grids From Scratch)
While MAP transforms existing cells, MAKEARRAY creates a brand-new 2D array of a specified row and column size by calling a LAMBDA with each cell’s row and column index:
=MAKEARRAY(rows, cols, LAMBDA(row, col, calculation))
- rows (Required): Total number of rows to generate. Must be an integer greater than
0. - cols (Required): Total number of columns to generate. Must be an integer greater than
0. - lambda (Required): A two-parameter
LAMBDA(r, c, calculation)receiving the current 1-based row indexrand column indexc.
To generate a dynamic 4×4 multiplication grid starting in cell B14 of your Practice sheet without typing a single input value, enter:
=MAKEARRAY(4, 4, LAMBDA(r, c, r*c))
In real-world financial models, MAKEARRAY shines for building dynamic amortization grids, tiered pricing tables, or random test matrices using RANDBETWEEN or CHOOSE inside the LAMBDA.
MAP vs. MAKEARRAY vs. BYROW & BYCOL
Use this comparison table to pick the right LAMBDA helper function for your task:
| Function | Input Required | Output Shape | LAMBDA Parameters | Best Use Case |
|---|---|---|---|---|
| MAP | 1 or more arrays | Same size as input array(s) | 1 per input array | Element-by-element transforms & multi-column AND/OR checks |
| MAKEARRAY | Row & column counts | rows × cols grid | 2 (row, col) | Multiplication grids, schedules, synthetic test tables |
| BYROW / BYCOL | 1 2D array | 1 column or 1 row summary | 1 (entire row or col) | Row/column totals, peaks, or pass/fail flags |
Troubleshooting #VALUE!, #SPILL!, and #NAME? Errors
- #VALUE! error (“Incorrect Parameters”): Per Microsoft Support,
MAPreturns#VALUE!if the number ofLAMBDAparameters doesn’t match the number of input arrays. InMAKEARRAY, passingrowsorcolsless than1(or non-numeric values) also returns#VALUE!. - Mismatched array sizes in MAP: When passing multiple ranges to
MAP(such asB6:B11andC6:C10), mismatched row or column counts produce#VALUE!or#N/Aerrors—always align range bounds. - #SPILL! error: Both functions spill dynamically onto neighboring cells. Clear any existing values or merged cells in the output path—see our guide on how to fix the #SPILL! error in Excel.
- #NAME? error: The workbook was opened in Excel 2021 or older, where
MAPandMAKEARRAYare not supported.
Frequently Asked Questions
Download the practice workbook
The same data as this tutorial, with empty answer cells and a Solutions sheet.