LAMBDA lets you package a formula into a reusable custom function with your own name — =TaxInc(price) instead of copying a long calculation everywhere. Define it once in the Name Manager; call it like any built-in.
TaxInc as:
=TaxInc(A2) returns the tax-included price. The logic lives in one place.
How it works
Once TaxInc is named, it behaves like a built-in function.
| A | B | |
|---|---|---|
| 1 | Price | =TaxInc(A) |
| 2 | 100 | 108 |
| 3 | 50 | 54 |
| 4 | 200 | 216 |
The formula
The definition (saved as a named function TaxInc):
How it works
LAMBDA turns a formula into a named, reusable function:
- A LAMBDA lists its parameters first, then the calculation that uses them:
LAMBDA(price, price * 1.08). - Open Formulas → Name Manager → New, name it
TaxInc, and paste the LAMBDA as the “Refers to.” - Now
=TaxInc(A2)works like any function — and you can change the rule once in Name Manager to update every use. - LAMBDAs can call themselves (recursion) and are what power MAP, REDUCE, SCAN, BYROW, and friends.
Test before naming. You can call a LAMBDA inline by adding the argument in extra parentheses: =LAMBDA(price, price*1.08)(100) returns 108. Once it works, save it in Name Manager to reuse it.
Try it: interactive demo
Call the custom TaxInc function on a price.
Variations
Multiple parameters
A margin function:
Inline test (no name needed)
Add the arguments to run it once:
Recursive LAMBDA
A named LAMBDA can call itself for loops/recursion (e.g. factorial).
Pitfalls & errors
LAMBDA alone in a cell shows #CALC!. A bare LAMBDA is a function definition, not a value. Call it (inline parentheses) or save it in Name Manager and call by name.
Excel 365 only. LAMBDA and named functions don’t exist before 365.
Name rules apply. The function name can’t clash with a cell reference or contain spaces — use names like TaxInc or Tax_Inc.
Practice workbook
Frequently asked questions
How do I create a custom function in Excel with LAMBDA?
How do I test a LAMBDA without naming it?
Why does my LAMBDA show #CALC!?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class