MAP Function
Runs a LAMBDA on every value in an array and returns all the results.
Category
Logical
Available in
Microsoft 365, Excel 2024
Returns
A spilled array, one result per value
Overview
MAP goes through an array one value at a time, runs your LAMBDA on it, and spills back a result for each.
Its real strength is doing row-by-row logic that functions like AND and OR can't, because they collapse a whole range into one answer.
Syntax
=MAP(array1, [array2, …], lambda)
Arguments
| Argument | Required? | What it does |
|---|---|---|
| array1 | Yes | The values to work through. |
| array2, … | Optional | More arrays of the same size, handed to the LAMBDA side by side. |
| lambda | Yes | A LAMBDA with one parameter per array. Always the last argument. |
Examples
Example 1 — AND for every row
Qualify each rep with sales of 500+ and a rating of 4+, in one spilled formula.
D2fx=MAP(B2:B5, C2:C5, LAMBDA(s, r, IF(AND(s>=500, r>=4), "Yes", "No")))
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Rep | Sales | Rating | Bonus |
| 2 | Ana | 620 | 4.5 | Yes |
| 3 | Ben | 480 | 4.8 | No |
| 4 | Cara | 500 | 3.9 | No |
| 5 | Dev | 710 | 4.2 | Yes |
=MAP(B2:B5, C2:C5, LAMBDA(s, r, IF(AND(s>=500, r>=4), "Yes", "No"))) Explain
- MAP hands each pair of values — Sales as s, Rating as r — to the LAMBDA.
- Because AND sees one pair at a time, it gives a separate answer for each row.
Example 2 — Cleaning every value
Tidy a column of names in one go.
=MAP(A2:A50, LAMBDA(n, PROPER(TRIM(n)))) Explain
Common mistakes
- Arrays of different sizes. Every array must have the same shape, or MAP returns #VALUE!.
Notes

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.