MAP
Apply a LAMBDA to every value in one or more arrays and return a new array of the results with MAP.
Spreadsheet editor
Spreadsheet editor
Syntax
=MAP(array1, [array2, ...], lambda)
Returns: Array Arguments
| Argument | Required | Description |
|---|---|---|
| array1 | Yes | The first array or range whose values you want to transform. |
| array2, ... | No | Extra arrays to process alongside the first. Every array must have the same number of rows and columns. |
| lambda | Yes | A LAMBDA that runs on each value. It must have one parameter for each array you pass and must be the last argument. |
About
Use MAP when you want to transform a whole range without dragging a formula down every row. It shines when your logic is too custom for a built-in function, for example combining two columns, reshaping text, or applying a tiered rule to each value. Because the result is a dynamic array, it resizes itself whenever your source data grows or shrinks.
MAP can take several arrays at once, and the LAMBDA needs one parameter for each array. This makes it a clean way to do element-by-element math across columns, similar to what SUMPRODUCT does, but with full control over the calculation. Pair it with SEQUENCE to generate input numbers, or feed it a trimmed range from FILTER when you only want to transform matching rows.
Examples
Multiply two columns into line totals
Spreadsheet editor
Clean a messy column of names
Spreadsheet editor
Spot a mismatched-range error
Spreadsheet editor
Watch out for
Parameter count does not match the arrays
You pass two arrays but give the LAMBDA only one parameter (or the other way around), so MAP returns a #VALUE! error.
→ Match them up. The LAMBDA needs exactly one parameter for each array, in the same order you listed the arrays.
Arrays are different sizes
The arrays you pass have different numbers of rows or columns, and MAP cannot line them up, so you get a #VALUE! error.
→ Make every array the same shape. If one range is shorter, fix the reference so all arrays cover the same number of rows and columns.
The LAMBDA is not the last argument
You put the LAMBDA before an array or forgot it entirely, and MAP returns an error.
→ Always list your arrays first and finish with the LAMBDA. It must be the final argument.
Function not available
MAP returns a #NAME? error in older Excel versions that do not include it.
→ MAP needs Microsoft 365 or Excel for the web. On older versions, copy a normal formula down each row, or use SUMPRODUCT for element-by-element math.