Function · LAMBDA
Excel MAP function
The Excel MAP function runs a LAMBDA on each value and spills the results. $49, $12, and $8 at 8.25% tax become $53.0425, $12.99, and $8.66.
Syntax =MAP(array, lambda)
=MAP(A1:A3,LAMBDA(price,price*1.0825))Arguments
| Name | Required | What to pass |
|---|---|---|
| array | Required | The values to feed the LAMBDA, one at a time. You can pass more arrays of the same shape. The LAMBDA then takes one parameter per array. |
| lambda | Required | A LAMBDA with one parameter per array. Its result is spilled once per input. |
Examples
Price plus 8.25% on three amounts
=MAP(A1:A3,LAMBDA(price,price*1.0825))Result $53.0425, $12.99, and $8.66
| A | B | |
|---|---|---|
| 1 | 49 | 53.0425 |
| 2 | 12 | 12.99 |
| 3 | 8 | 8.66 |
MAP applies one LAMBDA to every value and spills a result of the same shape. Multiplying by 1.0825 adds 8.25% to each price. $49 becomes $53.0425, $12 becomes $12.99, and $8 becomes $8.66. The source prices stay where they were.
Pass two arrays of the same size and the LAMBDA receives one value from each, row by row. A parameter count that does not match is #VALUE!. BYROW is the version that hands the LAMBDA a whole row. BYCOL hands it a whole column. MAKEARRAY starts from a row count and a column count. The LAMBDA receives those position numbers. On that page, MAX of each month spills $4,200, $6,400, $5,100, and $4,750. MAP hands it one cell. Excel 2021 does not have MAP.