
In this article
The introduction of LET and LAMBDA represents the most transformative formula upgrade in Excel’s history. With LET, you can assign descriptive names to intermediate calculation steps, drastically boosting formula readability and eliminating duplicate processing. With LAMBDA, you can create fully custom, reusable spreadsheet functions without writing a single line of VBA or macro code.
Understanding the LET Function
Before LET, calculating complex metrics often forced formulas to repeat the same calculation twice (e.g. evaluating an expensive lookup inside an IF condition):
' Traditional Repetitive Formula
=IF(XLOOKUP(A2, Products!A:A, Products!D:D, 0) > 100, XLOOKUP(A2, Products!A:A, Products!D:D, 0) * 0.9, XLOOKUP(A2, Products!A:A, Products!D:D, 0))
With LET, the lookup runs exactly once, storing the result in a local variable price:
=LET(
price, XLOOKUP(A2, Products!A:A, Products!D:D, 0),
IF(price > 100, price * 0.9, price)
)
Building Your First Custom LAMBDA Function
The LAMBDA function defines parameters and calculation logic:
=LAMBDA(cost, tax_rate, cost * (1 + tax_rate))
To turn this into a permanent custom function that colleagues can use across the entire workbook:
- Navigate to Formulas > Name Manager > New.
- Enter the function name, e.g.
CALCTAX. - Paste the LAMBDA definition into the Refers to box.
- Use your new function in any cell:
=CALCTAX(B2, 0.18)!
Frequently Asked Questions
Do workbooks with LAMBDA functions require .xlsm macro format?
No! LAMBDA functions are native spreadsheet formulas and save cleanly in standard .xlsx workbooks without triggering corporate macro security warnings.
Can LAMBDA functions call themselves recursively?
Yes, Excel LAMBDAs natively support recursion, enabling you to build iterative loops, reverse strings, or strip non-alphanumeric characters purely in formulas.
How does LET improve workbook performance?
LET caches intermediate formula results in memory. Instead of calculating an expensive lookup or calculation 4 times across nested logic, it runs once and reuses the stored value.
🚀 Dive deeper into modern formulas: Read our Formula Combos Guide or test equations in the Formula Lab.
Stuck on a step? Ask a question and the AI answers using this article.