Dynamic arrays

Excel LET Function: Name Values Inside a Formula

Defines names inside a formula so you can reuse a calculation instead of repeating it.

LET lets a formula give a name to something and then use that name. It exists because of a pattern everyone recognises: a formula that calls the same VLOOKUP twice, once to check whether it worked and once to return it. LET calculates it once, calls it something, and uses the name in both places.

The syntax is pairs — name, value, name, value — ending with one final expression that actually gets returned. =LET(score, B2*1.1, IF(score>1000, score, 0)) names the calculation, then uses it twice without repeating it. The last argument is always the result and never has a name of its own.

The gain is partly speed, since a calculation done once beats the same one done three times, and mostly readability. A long formula built from named steps can be read top to bottom by someone who did not write it, which is not true of the same logic inlined.

Syntax

=LET(name1, value1, [name2, value2], …, calculation)

Arguments

name1
Required
A name for the first value. It must start with a letter and cannot look like a cell reference — A1 is not allowed.
value1
Required
What that name refers to. It can use any name defined before it, so steps can build on each other.
calculation
Required
The final expression, whose result the formula returns. It is always last and always unnamed.

The example data

Headers in row 1, data in A2:C6.

ABC
1PlayerScoreEmail
2Alice Moreau1240alice@northwind.com
3Bruno Santos385bruno@southgate.co.uk
4Chen Wei2100chen@northwind.com
5Dana Okafor940dana@eastvale.org
6Erik Halls1560erik@southgate.co.uk

Worked examples

=LET(bonus, B2*0.1, B2+bonus)

Result: 1364

The simplest shape: name one intermediate value, then use it. Two arguments plus the result.

=LET(total, SUM(B2:B6), avg, total/5, IF(B2>avg, "Above", "Below"))

Result: Above

Two names, and the second is built from the first — that is what makes LET a sequence of steps rather than just a rename.

=LET(found, XLOOKUP("Chen Wei", A2:A6, B2:B6), IF(ISNA(found), 0, found))

Result: 2100

The pattern LET was made for: the lookup runs once instead of once per branch.

=LET(top, SORT(FILTER(A2:B6, B2:B6>900), 2, -1), TAKE(top, 3))

Result: Chen Wei 2100, Erik Halls 1560, Alice Moreau 1240

Naming a whole spilled array, then acting on it. Names can hold ranges, not just single values.

Now practise it

Reading about a formula is not the same as writing one. Open this function's exercise and type it into a real grid — you get instant feedback on exactly which cell is wrong and why.

Open the exercise: Name a value so the formula reads like a sentence

Common errors and how to fix them

#VALUE!

Why it happens: An odd number of name/value arguments before the final calculation — usually a name defined with no value, or the result accidentally given a name.

How to fix it: Count them: every name needs a value, and the very last argument stands alone.

#NAME?

Why it happens: A name is used before it is defined, or it clashes with something Excel reserves — anything that looks like a cell reference such as A1 or XFD3.

How to fix it: Define names before using them, and pick words rather than letter-number combinations.

The formula returns a name instead of a value

Why it happens: The final argument is a name/value pair rather than an expression.

How to fix it: LET always ends with the thing to return. If your last two arguments are a pair, you are missing the result.

Tips worth knowing

  • Name things after what they mean, not what they are: `overdue` reads better than `filtered1`.
  • LET pairs naturally with FILTER and SORT — name the filtered set once, then sort, count and take from it.
  • Nesting LET inside LET works but rarely helps; add another name to the same LET instead.
  • LAMBDA is the next step up: where LET names values inside one formula, LAMBDA turns the formula itself into a reusable named function.

Frequently asked questions

Does LET actually make formulas faster?

Yes, when it removes repeated work. A formula that called the same VLOOKUP three times now calls it once. If nothing was being repeated, the gain is readability rather than speed — which is usually reason enough.

What names am I not allowed to use?

Anything that looks like a cell reference (A1, XFD3), anything already defined as a named range in the workbook, and names starting with a digit. Ordinary descriptive words are safe.

What is the difference between LET and LAMBDA?

LET names values inside a single formula and its names disappear when the formula ends. LAMBDA defines a reusable function that you save in the Name Manager and call from anywhere in the workbook, with arguments of its own.

Related functions

Guides that use it

Longer reads where this function does real work in a real sheet.