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.
LET(name1, value1, [name2, value2, ...], calculation)| Argument | What it means |
|---|---|
| name1 required | A name you choose for the first variable. Must start with a letter, no spaces. |
| value1 required | The value or expression assigned to name1. |
| name2, value2 optional | Additional name/value pairs. Up to 126 pairs allowed. |
| calculation required | The final expression that uses the named variables. This is what the formula returns. |
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)
)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
)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.
Filter and sort, naming the intermediate step:
=LET(
filtered, FILTER(A2:C100, B2:B100="North"),
SORT(filtered, 3, -1)
)Type it in a live spreadsheet, get instant feedback. No videos, no downloads.
Start practising free →