MAP Function

Excel Functions › Logical

Excel 365

The Excel MAP function applies a LAMBDA to every element of an array and spills back an array of the same shape, transformed. It is the “do this to each value” tool — the formula that replaces a helper column you’d otherwise drag down 500 rows. Feed it two or more arrays and it zips them together, passing matching elements into a multi-parameter LAMBDA.


Quick answer: to add 8.25% sales tax to every price in B2:B6 with a single spilled formula:
=MAP(B2:B6, LAMBDA(p, ROUND(p*1.0825, 2)))
MAP hands each price to the LAMBDA as p, evaluates the calculation, and returns the results in the same 5-row shape.

Syntax

=MAP(array1, [array2, …,] lambda)
ArgumentDescription
array1RequiredThe range or array whose elements you want to transform. The result has the same dimensions.
array2, …OptionalAdditional arrays of the same size. Element 1 of every array goes into the LAMBDA together, then element 2, and so on.
lambdaRequiredA LAMBDA with exactly one parameter per array. With one array it receives one element; with three arrays it must declare three parameters.

Available in: Excel for Microsoft 365 and Excel for the web only. Older versions show #NAME?. The result is a dynamic array that spills.

Transform every value in a column

Prices sit in B2:B6. One formula in C2 returns the taxed price for every row — no fill handle, no helper column to maintain:

ABC
1ItemPriceWith tax
2Notebook4.995.40
3Desk lamp24.5026.52
4Cable kit12.7513.80
5Monitor arm89.0096.34
6USB hub19.9921.64
=MAP(B2:B6, LAMBDA(p, ROUND(p*1.0825, 2))) // spills 5 results into C2:C6

The LAMBDA’s parameter receives one element at a time — a single price, not the whole range. Add a row to the source and re-point the range (or use a Table) and the spill grows with it.

Text works the same way:

=MAP(A2:A6, LAMBDA(t, UPPER(TRIM(t)))) // clean and capitalize every label

Try it: interactive MAP demo

Live demo

Pick a transformation and watch MAP apply it to every price in the list.

Zip multiple arrays into one LAMBDA

Pass two arrays and declare two parameters — MAP feeds matching elements in pairs. Quantity times price, element by element:

=MAP(B2:B6, C2:C6, LAMBDA(qty, price, qty*price)) // row 2 with row 2, row 3 with row 3, ...

Element-wise logic that would otherwise need a clumsy nested IF over two ranges:

=MAP(B2:B6, C2:C6, LAMBDA(actual, target, IF(actual>=target, "Hit", "Miss")))

MAP also nests cleanly inside other dynamic-array functions:

=SUM(MAP(B2:B100, LAMBDA(v, MAX(v, 0)))) // sum only the positive part of each value

Choosing a helper: MAP transforms each element. If you need one result per whole row or column, that’s BYROW / BYCOL; one running total, SCAN; one single value, REDUCE; a brand-new grid from indexes, MAKEARRAY.

Errors & common pitfalls

#CALC! — parameter count doesn’t match array count. Two arrays need a two-parameter LAMBDA: =MAP(A2:A9, B2:B9, LAMBDA(a, a*2)) fails because the second array’s elements have nowhere to go. Declare one parameter per array, in order.

#VALUE! — arrays are different sizes. Zipping A2:A10 with B2:B8 fails — every array must have identical dimensions so elements pair up one-to-one.

#NAME? — older Excel. MAP (and LAMBDA itself) exist only in Excel for Microsoft 365 and Excel for the web. There is no equivalent in Excel 2021 or earlier.

Pitfall: the LAMBDA gets elements, not ranges. Inside MAP, the parameter is a single value, so aggregations like SUM(p) just return that one value. If your instinct is “SUM each row,” you want BYROW, which passes whole vectors instead.

Pitfall: #SPILL! from a blocked landing zone. MAP returns an array the same size as the input — it needs that many empty cells below/beside the formula.

Practice workbook

📊
Download the free MAP practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does the Excel MAP function do?
MAP runs a LAMBDA once per element of an array and returns a new array of the same shape containing the results. It replaces drag-down helper columns with a single spilled formula.
How do I use MAP with two arrays?
List the arrays first, then a LAMBDA with one parameter per array: =MAP(B2:B9, C2:C9, LAMBDA(qty, price, qty*price)). MAP zips them — first elements together, second elements together, and so on. The arrays must be the same size.
What's the difference between MAP and BYROW?
MAP’s LAMBDA receives one element (a single cell’s value); BYROW’s receives one whole row as a vector. Use MAP to transform values in place, BYROW to aggregate each row down to one result.
Why does MAP return #CALC!?
Almost always a parameter-count mismatch: the LAMBDA must declare exactly one parameter for each array you pass. One array, one parameter; three arrays, three parameters.
Which Excel versions support MAP?
Excel for Microsoft 365 and Excel for the web only. Excel 2021 and earlier show #NAME?. In older versions the closest substitute is an ordinary helper-column formula filled down.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: LAMBDA · BYROW · BYCOL · REDUCE · SCAN · MAKEARRAY · LET