LAMBDA with MAP: apply a calculation to a range
LAMBDA defines a small reusable calculation with named inputs, and MAP applies it to every cell in a range.
=MAP(A2:A10,LAMBDA(x,x*1.2))The sheet: A2:A10 holds net prices. You want every price with 20 percent added, in a single formula with no fill-down.
How it works, step by step
- 01A2:A10 is the range to process.
- 02LAMBDA(x,x*1.2) defines a calculation that takes one value, called x, and multiplies it by 1.2.
- 03MAP runs that calculation on each cell and returns the results as a spilled column.
The same logic in four tools
=MAP(A2:A10,LAMBDA(x,x*1.2))=MAP(A2:A10,LAMBDA(x,x*1.2))SELECT price * 1.2 AS gross_price
FROM products;df["gross_price"] = df["net_price"] * 1.2Mistakes that break it
- !Both MAP and LAMBDA need Microsoft 365 in Excel. Older versions return #NAME?.
- !For simple math like this, =A2:A10*1.2 spills in 365 too. MAP matters when the calculation uses functions that do not accept arrays.
- !Forgetting to give the LAMBDA a result expression returns an error.
Common questions
- Can I save a LAMBDA with a name?
- Yes. In Excel add it in Name Manager, and in Google Sheets use Data, Named functions. You can then call it like any other function.
- What is the difference from LET?
- LET names values inside one formula. LAMBDA names a calculation that takes inputs, so it can be reused.
Got a version of this with your own ranges?
Paste it into the free translator and get the same breakdown for your exact formula. To run it against a real file, upload the CSV and describe the formula you need in a sentence.