LET: Name Values Inside a Formula

Excel Formulas › Advanced

365 / 2021LET

LET lets you name a value or sub-calculation once and reuse it — making long formulas readable and faster, because a repeated calculation runs only once.


Quick formula: name the parts, then use them in the result:
=LET(net, A1-A2, tax, net*0.08, net + tax)
Pairs of name/value come first; the final argument is the result that uses those names. net is computed once and reused.

Functions used (tap for the full reference guide):

The example

Compute net then tax without repeating the subtraction.

AB
1StepValue
2Gross − discount (net)100
3net + 8% tax108

The formula

Define names, then the result:

=LET(net, A1-A2, tax, net*0.08, net + tax) // net computed once, used twice

How it works

LET takes name/value pairs, then a final result:

  1. Each pair is a name and the value it stands for: net, A1-A2.
  2. Later pairs can use earlier names: tax, net*0.08.
  3. The last argument is the result expression, written with those readable names.
  4. A value named in LET is calculated once — repeating A1-A2 five times in a normal formula recalculates it five times; LET does it once.

Great with heavy lookups. If a slow XLOOKUP appears several times in one formula, name it in LET so it runs a single time — both clearer and faster. Names are local to the formula; they don’t clutter the workbook.

Try it: interactive demo

Live demo

Gross and discount → net + 8% tax.

net · with tax

Variations

Reuse a lookup

Run XLOOKUP once:

=LET(x, XLOOKUP(A1,k,v), IF(x>0, x, "n/a"))

Multiple names

Chain steps:

=LET(a, A1, b, a*2, c, b+1, c)

Readable percent change

Name old & new:

=LET(o, A1, n, A2, (n-o)/o)

Pitfalls & errors

Odd number of arguments. LET needs name/value pairs plus a final result — so an odd total. A missing result errors.

365/2021 only. LET doesn’t exist in Excel 2019 or earlier — the formula returns #NAME? there.

Names can’t clash with cell refs. Don’t name a variable A1 or SUM; use plain words.

Practice workbook

📊
Download the free LET: Name Values Inside a Formula practice workbook
A LET example (shown as the formula text plus result) with reuse and chaining variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

What does the LET function do in Excel?
LET names values or sub-calculations inside a formula, then uses those names in the result. It makes long formulas readable and runs a repeated calculation only once. Syntax: =LET(name, value, ..., result).
Why is LET faster?
A value named in LET is computed a single time even if you use the name several times, whereas repeating the expression recalculates it each time.
Which Excel versions have LET?
Excel 365 and Excel 2021. Earlier versions return #NAME?.

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

Related formulas: LAMBDA function · LAMBDA + LET combo · Named LAMBDA function

Function references: LET