Ravindra BagaleCourses & study guides Track your progress

Excel LET Function

Chala mitrano — lET lets you name a piece of a formula once and reuse it. Shorter formulas. Easier to read.

Excel 365 / Excel 2021. LET needs Microsoft 365 or Excel 2021. Not in Excel 2019 or older.
Fictional sample data. Warehouse pick list (Bhiwandi) and a Berlin spare-parts desk. Mixed ₹ and €.

Purpose

Store intermediate calculations in named variables inside one formula, then return a final result. Makes long formulas faster and clearer.

Return value

The value of the final calculation argument.

Syntax

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

Arguments

ArgumentRequired?Description
name1RequiredFirst variable name (no spaces).
value1RequiredValue or expression for that name.
name2, value2, …OptionalMore name/value pairs.
calculationRequiredFinal expression using those names (last argument).

Version

Microsoft 365 and Excel 2021. Pair with LAMBDA for custom functions.

How to use — Why → What → How

Why: The same VLOOKUP or FILTER range is typed three times. One typo breaks the sheet. LET names it once.

What: You alternate name, value, name, value, then a final calculation that uses the names.

How — numbered steps:

  1. Click the result cell.
  2. Type =LET(
  3. Type a name (example: total), comma, then the expression (example: SUM(D2:D20)).
  4. Add more pairs if needed.
  5. End with the final calculation (example: total*1.18) and press Enter.

Ravindra Bagale's Tip

Friends, names inside LET are not workbook names. They live only inside that formula.

Worked examples

1) Name a sum, then add GST

Ravi Kulkarni’s Bhiwandi pick list: quantities in D2:D4 are 10, 4, 6.

Formula: =LET(total, SUM(10,4,6), total*1.18)

Result: 23.6

What it means: total is 20; final calculation multiplies by 1.18.

2) Two names — net after discount

List price ₹1,500, discount 12%.

Formula: =LET(price, 1500, disc, 0.12, price*(1-disc))

Result: 1320

What it means: price and disc are stored; last argument returns the net.

3) Reuse a long lookup once

Imagine a heavy XLOOKUP stored as city, then tested.

Formula: =LET(city, "Nashik", IF(city="Nashik", "MH warehouse", "Other"))

Result: MH warehouse

What it means: In real sheets, replace "Nashik" with an XLOOKUP — still calculated once.

4) Euro spare part (€)

Sofia Keller in Berlin: unit €18.40 × 5, then 5% handling.

Formula: =LET(units, 5, rate, 18.4, base, units*rate, base*1.05)

Result: 96.6

What it means: Three named steps keep the formula readable.

5) Text + number together

Formula: =LET(n, 3, "Boxes: "&n)

Result: Boxes: 3

What it means: Final calculation can return text.

About this data. Bhiwandi / Berlin figures are teaching fiction for formula practice only.

Common errors and fixes

#NAME? — You used a LET variable outside the formula, or Excel is too old. Fix: Variables work only inside that LET; upgrade to 365/2021.
#VALUE! — Odd number of arguments / missing final calculation. Fix: Pairs of name+value, then one calculation at the end.
Wrong result — Name reused with a new value later in the same LET. Fix: Read top to bottom; later pairs can depend on earlier names.

LAMBDA, IF, XLOOKUP, FILTER, MAP

Practice tasks (10)

  1. Task 1. LET that names total as 25+30 and returns total.
    Hint: last argument can be just total
  2. Task 2. Name price 200 and tax 0.18; return price*(1+tax).
    Hint: two pairs + calculation
  3. Task 3. Build LET with units 8 and rate 40; return units*rate.
    Hint: result 320
  4. Task 4. Return text "City: Pune" using a named variable city.
    Hint: "City: "&city
  5. Task 5. Explain why LET(a, 1, a+a) is better than repeating a long formula twice.
    Hint: calculate once
  6. Task 6. Three names: a=2, b=3, c=4; return a*b*c.
    Hint: result 24
  7. Task 7. Use LET with a named discount 0.1 on €250.
    Hint: price*(1-disc)
  8. Task 8. Intentionally omit the final calculation and note the error, then fix it.
    Hint: pairs need a finale
  9. Task 9. Rewrite a nested IF using LET names for clarity (any simple example).
    Hint: name the test value first
  10. Task 10. Bonus: combine LET with IF to label totals ≥1000 as "Big".
    Hint: name total, then IF(total>=1000…)

Quick quiz

Q1. The final argument of LET is the calculation that returns the result.
Q2. LET variable names are global workbook names.
Q3. LET is available in Excel 2016 by default.
Q4. A good reason to use LET is:

Answers: Q1=True, Q2=False, Q3=False, Q4=calculate once.