LET Function

Excel Functions › Logical

Excel 365 Excel 2021+

The Excel LET function lets you give names to values and expressions inside a formula, then use those names in the final calculation. Two payoffs: formulas become readable — tax instead of a repeated 40-character expression — and faster, because Excel computes each named value once no matter how many times the name appears. If you have ever pasted the same XLOOKUP three times into one IF, LET is the cure.


Quick answer: name a lookup once, reuse it twice:
=LET(price, XLOOKUP(A2, Items, Prices), IF(price>100, price*0.9, price))
Without LET that XLOOKUP appears three times and runs three times. With LET it runs once. Requires Excel 365 or Excel 2021+.

Syntax

=LET(name1, value1, [name2, value2, ...], calculation)
ArgumentDescription
name1RequiredThe first name. Must start with a letter, contain no spaces, and must not look like a cell reference — tax is fine, A1 or TX2 are not.
value1RequiredThe value or expression assigned to name1 — a number, a range, or a whole formula.
name2, value2, ...OptionalUp to 126 name/value pairs. Later pairs may use earlier names — margin can be defined in terms of revenue and cost.
calculationRequiredThe final expression, using any of the names. Always the last argument — this is what the cell displays.

Available in: Excel for Microsoft 365, Excel 2021 and later, and Excel for the web. Older versions show #NAME?. The names live only inside the formula — they don’t appear in the Name Manager and can’t clash with other cells’ formulas.

Name once, use many times

Here is the same business rule — a 10% discount on orders over $100, looked up from a price list — written both ways:

=IF(XLOOKUP(A2,Items,Prices)>100, XLOOKUP(A2,Items,Prices)*0.9, XLOOKUP(A2,Items,Prices)) // without LET: 3 copies, 3 lookups
=LET(price, XLOOKUP(A2,Items,Prices), IF(price>100, price*0.9, price)) // with LET: 1 copy, 1 lookup

Beyond readability, this is a real performance difference: Excel evaluates value1 a single time and reuses the result wherever the name appears. On a sheet with thousands of rows of triple-lookup formulas, the LET version does a third of the work.

Chained names build up a calculation step by step, like a tiny script:

=LET(revenue, B2, cost, C2, margin, (revenue-cost)/revenue, TEXT(margin, "0.0%")) // later names can use earlier ones

Try it: with and without LET, side by side

Live demo

Change the looked-up price. Both formulas always agree on the answer — but watch the evaluation counter: the plain version re-runs the lookup for every copy, LET runs it once.

LET with LAMBDA and dynamic arrays

LET is the natural companion of the dynamic-array family. Name an intermediate array once, then filter, sort, and measure it without recomputing:

=LET(hits, FILTER(A2:C500, C2:C500>1000), IF(ROWS(hits)>10, TAKE(SORT(hits,3,-1),10), hits)) // filter once, reuse three times

Inside LAMBDA definitions, LET keeps multi-step logic legible — most serious LAMBDAs open with a LET:

=LAMBDA(rng, LET(t, TRIM(rng), n, LEN(t), IF(n=0, "empty", n))) // a LAMBDA whose body is a LET

And it stacks happily with MAP, BYROW, and SCAN — name the pieces, keep the final line short.

Style tip: add Alt+Enter line breaks between each name/value pair in the formula bar. LET formulas formatted one-pair-per-line read like code — because they are.

Errors & common pitfalls

#NAME? — two distinct causes. Either your Excel predates LET (it needs Excel 2021 or Microsoft 365), or a name breaks the rules: names must start with a letter and must not look like a cell reference. rate works; R2 is a cell address and fails; 2x starts with a digit and fails.

#VALUE! — unpaired arguments. Every name needs a value, and the calculation must come last. An even argument count usually means a value is missing or the final calculation was forgotten.

Pitfall: using a name before it’s defined. Pairs evaluate in order — name2’s value may reference name1, but not the other way round.

Pitfall: shadowing. A LET name temporarily overrides a workbook-level defined name inside that formula. Legal, but confusing — pick names that don’t collide.

Practice workbook

📊
Download the free LET practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does the LET function do in Excel?
It assigns names to values or expressions inside a formula, then uses those names in a final calculation: =LET(x, A2*B2, x+x^2). Result: shorter, more readable formulas, and each named expression is computed only once.
Does LET actually make formulas faster?
Yes, when a formula repeats an expensive expression. Excel evaluates each LET value once and reuses it, so a lookup repeated three times becomes one lookup. On one cell it's unnoticeable; on 50,000 rows it's real.
What are the naming rules for LET?
Names must start with a letter (or underscore), contain no spaces or operators, and must not look like a cell reference — so tax and total_q1 are fine, but A1, XFD2, and 2x all fail with a name error.
Which Excel versions support LET?
Excel for Microsoft 365, Excel 2021 and later, and Excel for the web. Excel 2019 and earlier don't recognize it. Files opened there show the last calculated value but display #NAME? once recalculated.
Can a LET name refer to another LET name?
Yes — later pairs can use any earlier name: =LET(rev, B2, cost, C2, margin, rev-cost, margin/rev). The reverse direction fails, since pairs evaluate top to bottom.
LET vs defined names (Name Manager) - when to use which?
LET names exist only inside one formula; Name Manager names are workbook-wide. Use LET for intermediate steps of a single calculation; use defined names for ranges and constants shared by many formulas.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: LAMBDA · MAP · REDUCE · SCAN · BYROW · XLOOKUP