FormulaCamp
Completed
← All functions
Dynamic arrays

LET

Names for intermediate results inside a formula.

Syntax

LET(name1, value1, …, calculation)

Example: =LET(x,A2*2,x+1)

Available in: Excel 2021+, Microsoft 365

LET gives names to values or calculations inside a formula, so each is computed once and reused: =LET(name1, value1, …, calculation). It makes long formulas readable and can speed up heavy ones.

When to use it

Arguments explained

Worked examples

Name a constant

A
1Net
2200

Formula: C1: =LET(tax,0.0825,A2*(1+tax))

Result: 216.5

tax is defined once, then used in the calculation.

Reuse a sum

A
1Share
225
350
425

Formula: C1: =LET(total,SUM(A2:A4),A2/total)

Result: 0.25

total is calculated once and reused; here 25 / 100.

Intermediate result in a test

AB
1SpendBudget
2120100

Formula: D2: =LET(ratio,A2/B2,IF(ratio>1,"Over","Within"))

Result: Over

ratio is named once and used in the IF.

Try it

A tiny spreadsheet with example data. Edit the formula or any number and see the result.

Formula in F2: =LET(total,SUM(C2:C7),total/COUNT(C2:C7))

Example spreadsheet for LET
ABCDEF
1RegionProductUnitsPriceResult
2EastPen1202.558.3333333333
3WestPen802.5
4EastBook4512
5NorthBook6012
6WestLamp3025
7EastLamp1525
Result in F2: 58.3333333333
Practice this in a lesson: LET, TEXTBEFORE, TEXTAFTER

Common errors and how to fix them

Related functions

Frequently asked questions

Does LET make formulas faster?
It can: a repeated expensive calculation runs once instead of several times.
Can later names use earlier names?
Yes. Each name can use the ones defined before it.
What is the difference between LET and a named range?
A named range is workbook-wide. LET names exist only within the formula they are in.
How many names can LET have?
Up to 126 name and value pairs.

More in Dynamic arrays