One tweak to your most-used formula and it suddenly reads like plain English. LET() lets you name the messy middle parts — so next month's you won't need to reverse-engineer what current you was thinking.
The win
Take a formula like this:
=IFERROR(XLOOKUP(A2, Orders[OrderID], Orders[Revenue], 0) * (1 - XLOOKUP(A2, Orders[OrderID], Orders[DiscountRate], 0)), 0)
It works. You will not know what it does in three weeks.
With LET:
=LET( revenue, XLOOKUP(A2, Orders[OrderID], Orders[Revenue], 0), discount, XLOOKUP(A2, Orders[OrderID], Orders[DiscountRate], 0), IFERROR(revenue * (1 - discount), 0) )
Same result. Now it's readable. The names aren't just comments — they're live variables the formula uses. Change revenue once and every reference to it updates.
How to do it
LET follows a simple pattern: name, value, name, value — as many pairs as you need — then the final expression that uses them.
=LET( name1, value1, name2, value2, final_expression )
- Open with
=LET( - Type a name — no spaces, no special characters, treat it like a variable name
- Comma, then the value or formula for that name
- Repeat for as many intermediate steps as you need
- Final argument is the expression that uses your named values
- Close the bracket
Names can reference earlier names in the same LET. So if you've defined revenue and discount, your final expression can use both — and you can define a third name that combines them before the final step.
Why it works
Excel evaluates each name once and reuses it. If the same lookup appears twice in your formula, wrapping it in LET means it runs once. On large ranges this is a genuine performance improvement, not just tidiness.
The readability payoff is the bigger win for most people. Formula auditing — yours or someone else's — goes from "trace every bracket" to "read the names."
When not to use it
LET is for complex formulas with repeated or intermediate steps. For a simple =XLOOKUP(...) or =SUM(...), adding LET is overhead with no benefit. Use it when you catch yourself writing the same sub-expression twice, or when you look at a finished formula and can't immediately say what it does.