Excel Function

Excel LET function

Name your calculations inside a formula — write it once, reuse it, and make your formulas readable.

LET lets you assign names to values or calculations inside a formula. Instead of repeating the same complex expression five times, you name it once and reference the name everywhere. The formula runs faster and is far easier to read and audit.

Syntax

LET(name1, value1, [name2, value2, ...], calculation)
ArgumentWhat it means
name1 requiredA name you choose for the first variable. Must start with a letter, no spaces.
value1 requiredThe value or expression assigned to name1.
name2, value2 optionalAdditional name/value pairs. Up to 126 pairs allowed.
calculation requiredThe final expression that uses the named variables. This is what the formula returns.

Basic example — avoiding repetition

Without LET — the same SUMIF expression appears twice:

-- Repetitive, calculates SUMIF twice =IF(SUMIF(A:A,"North",B:B)>10000, SUMIF(A:A,"North",B:B)*0.9, SUMIF(A:A,"North",B:B))

With LET — named once, used three times, calculated once:

=LET( northTotal, SUMIF(A:A,"North",B:B), IF(northTotal>10000, northTotal*0.9, northTotal) )

Multiple named variables

Calculate a commission: base salary + bonus, then apply tax:

=LET( base, A2, bonus, B2*0.1, gross, base + bonus, tax, gross * 0.2, gross - tax )
💡 LET makes formula auditing practical

When you revisit a formula six months later, named variables tell you what each piece is for. "northTotal" is clearer than a repeated SUMIF in every IF branch.

LET with dynamic array functions

Filter and sort, naming the intermediate step:

=LET( filtered, FILTER(A2:C100, B2:B100="North"), SORT(filtered, 3, -1) )
Does LET improve performance?
Yes, meaningfully. If you use the same complex expression multiple times in one formula without LET, Excel calculates it separately each time. With LET, it calculates once and reuses the result.
Can I use LET inside array formulas?
Yes. LET works with dynamic array functions (FILTER, SORT, UNIQUE) and produces spilled output just like any other array formula.
What version of Excel do I need?
LET requires Excel 365 or Excel for the web. It is available in Excel 2021 for Windows but not Excel 2019 or earlier.

Practice LET for real

Type it in a live spreadsheet, get instant feedback. No videos, no downloads.

Start practising free →