LAMBDA Function
Builds your own reusable function — no VBA needed.
Category
Logical
Available in
Microsoft 365, Excel 2024
Returns
A custom function you can name and reuse
Overview
LAMBDA turns a formula into a function. You list the inputs (parameters) and the calculation, then save it with a name in Name Manager.
From then on, =AddTax(B2) works anywhere in the workbook, just like a built-in function. LAMBDA is also what powers MAP, BYROW, REDUCE and friends.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| parameter1, … | Optional | Names for the inputs, up to 253. |
| calculation | Yes | The formula to run, using the parameter names. Always the last argument. |
Examples
Example 1 — Testing in a cell
Put the inputs in brackets straight after the LAMBDA to try it out.
This returns 113. Testing this way first saves debugging later.
Example 2 — Saving it as AddTax
In Formulas › Name Manager › New, name it AddTax and set “Refers to” to =LAMBDA(amount, amount*1.13).
| A | B | C | |
|---|---|---|---|
| 1 | Item | Price | With tax |
| 2 | Desk | 100 | 113 |
| 3 | Chair | 250 | 282.5 |
| 4 | Lamp | 40 | 45.2 |
Example 3 — Two inputs
A named Margin function: =LAMBDA(cost, price, (price-cost)/price).
Common mistakes
- #CALC! errors. A LAMBDA typed into a cell without inputs after it has nothing to calculate. Call it, or save it in Name Manager.
- Wrong number of inputs. Calling =Margin(B2) when it needs two gives #VALUE!.
Notes
- A named LAMBDA can call itself, which allows recursion.
- Related functions: LET, MAP, BYROW, BYCOL, REDUCE, SCAN, MAKEARRAY.

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.