Pair LAMBDA with LET to build a tidy, readable custom function: LAMBDA takes the arguments, LET names the intermediate steps inside. The result reads like real code.
net and uses it for the final result — clean and self-documenting.
The example
One function: discount a price, then add tax.
| A | B | |
|---|---|---|
| 1 | Call | Result |
| 2 | =NetAfterTax(120, 0.1, 0.08) | 116.64 |
The formula
LAMBDA for the inputs, LET for the steps:
How it works
The two combine naturally:
- LAMBDA lists the function’s parameters:
gross, disc, rate. - Its body is a LET that names intermediate values:
net, gross*(1-disc). - The LET’s final argument is the result, written with those names.
- Save the whole thing in Name Manager as a named function, then call
=NetAfterTax(120, 0.1, 0.08)anywhere.
This is the modern Excel pattern. LAMBDA for the interface, LET for the internals — named once, it replaces a sprawling repeated formula with a self-documenting function. Build complex logic step by step in LET so each part is testable.
Try it: interactive demo
NetAfterTax(gross, discount, tax).
Variations
Inline test
Call before naming:
Add a step
Name more intermediates in LET:
Compose functions
Call another named LAMBDA inside.
Pitfalls & errors
365/2021 only. Both LAMBDA and LET require modern Excel; older versions return #NAME?.
LET still needs a final result. Inside the LAMBDA body, the LET must end with a result expression after its name/value pairs.
Test inline first. Call the LAMBDA with arguments in a cell to debug, then move the definition (without the call) into Name Manager.
Practice workbook
Frequently asked questions
How do I combine LAMBDA and LET in Excel?
Why use LET inside a LAMBDA?
How do I test a LAMBDA before naming it?
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