LET lets you assign names to values, ranges, or intermediate results inside a single formula, then reuse those names in the final calculation. It makes long formulas shorter, faster, and much easier to read and edit.
=LET(name1, value1, [name2, value2, …], calculation)What does LET do?
LET is a formula-building function. Instead of writing the same expression over and over inside one formula, you give it a name once, then refer to that name wherever you need it. The structure is simple: pairs of a name and its value, followed by the calculation that uses those names. Excel evaluates each value once and reuses the result.
Why does this matter? Long formulas often repeat the same chunk three or four times, which is hard to read and slow to calculate. With LET you name that chunk, so the final calculation reads almost like plain English. You also get fewer mistakes: change the value in one place and every reference updates.
Picture a sales report where you need to check whether each order beats a target, then label it. Without LET you write the target calculation twice and the comparison twice. With LET you name the target, name the comparison, and the final step is a short IF that is easy to audit. That is the everyday win: formulas your colleagues can actually follow.
When to use LET
- You repeat the same calculation several times in one formula and want to name it once.
- A formula has grown so long that you struggle to read or debug it.
- You want to speed up a heavy formula that recalculates the same range repeatedly.
- You are building a nested IF or lookup and want intermediate steps labelled clearly.
- You want to document a formula so a teammate can understand the logic quickly.
- You are combining FILTER, SORT, or XLOOKUP and need to reuse a filtered range.
LET syntax
=LET(name1, value1, [name2, value2, …], calculation)| Argument | Required? | What to enter |
|---|---|---|
name1 | Required | The label you want to use inside the formula. It must start with a letter and cannot look like a cell reference such as A1. |
value1 | Required | What the name stands for: a number, text, cell reference, range, or another formula. |
name2, value2, … | Optional | Optional extra name-and-value pairs. You can add as many as you need, and later names can use earlier ones. |
calculation | Required | The final expression that uses the names. This is what LET returns, and it must be the last argument. |
What it returns: The result of the final calculation argument, with all named values evaluated once and reused.
LET examples
1 Name a value and use it twice
The goal is to work out a price with tax without typing the tax rate twice. LET names the price from B2 as price and the rate from C2 as rate, then the final step multiplies price by one plus rate. Because each value is read once, the formula is short and clear. It returns 108 for the first row's values.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Item | Price | TaxRate | |||
| 2 | Notebook | 100 | 0.08 | 108 | ||
| 3 | Pen | 2.5 | 0.08 | |||
| 4 | Folder | 6 | 0.08 | |||
| 5 |
2 Name a range and total it
Here you want the total of a sales column and the average of the same column. LET names the range sales once, then uses it in both SUM and AVERAGE inside the final calculation. This avoids repeating the range reference and makes the intent obvious. The formula returns the total, 4650, for the listed rows.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Sales | |||
| 2 | Ana | 1200 | 4650 | ||
| 3 | Ben | 900 | |||
| 4 | Cara | 1500 | |||
| 5 | Dan | 1050 | |||
| 6 |
3 Name an intermediate result for a bonus check
The goal is to flag whether each sale earns a bonus. LET first names the sale in B2 as amount and the target in C2 as goal, then names the difference as gap. The final IF checks whether gap is at least zero and returns Yes or No. For the first row the sale is 800 against a goal of 750, so it returns Yes.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Order | Amount | Goal | |||
| 2 | O-101 | 800 | 750 | Yes | ||
| 3 | O-102 | 620 | 750 | |||
| 4 | O-103 | 910 | 750 | |||
| 5 |
4 Discount tiers with named thresholds
You want a discount based on order size, with the thresholds named so the logic is readable. LET names the order value from B2 as order, then names two cut-offs, low and high. The nested IF compares order against those names and returns 0.05, 0.10, or 0.15. For an order of 450 the result is 0.1.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Customer | OrderValue | |||
| 2 | Acme | 450 | 0.1 | ||
| 3 | Bolt Ltd | 120 | |||
| 4 | Cedar Co | 980 | |||
| 5 | Delta Inc | 300 | |||
| 6 |
5 Realistic margin check with reused parts
This models a small business checking profit margin per product. LET names revenue from B2 and cost from C2, then names profit as revenue minus cost and margin as profit divided by revenue. The final step rounds margin to two decimals. For revenue 5000 and cost 3200, profit is 1800 and margin is 0.36, so it returns 0.36.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Product | Revenue | Cost | |||
| 2 | Basic | 5000 | 3200 | 0.36 | ||
| 3 | Pro | 8000 | 5200 | |||
| 4 | Team | 12000 | 9000 | |||
| 5 |
Common LET errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #NAME? | A name was typed differently in the calculation than in its definition, or the name looks like a cell reference such as A1. | Use the exact same spelling for each name and avoid names that resemble cell references; use words like total or rate. |
| #VALUE! | A name is used in the calculation but was never given a value, or the final argument is missing. | Check that every name has a matching value pair and that the calculation is the last argument. |
| #N/A | The final calculation refers to a name that resolves to an error value, often from a lookup that found nothing. | Wrap the lookup in IFERROR or confirm the lookup range actually contains the value. |
| #CALC! | A name is defined in terms of itself, creating a circular reference inside LET. | Define names in order so each one only uses names defined before it. |
| Too many arguments | An odd number of arguments was supplied, so Excel cannot pair names with values. | Count the arguments; you need name, value pairs plus one final calculation. |
Tips for using LET
- Name values in the order they are needed so later names can reuse earlier ones.
- Use short, meaningful names like
rate,total, orsalesrather than single letters. - Name a repeated range once instead of typing the same reference several times.
- Use LET to break a long nested IF into named steps you can check one at a time.
- Remember LET only works inside a single formula; the names do not carry over to other cells.
- Combine LET with FILTER or SORT to name a filtered range and reuse it cleanly.
Frequently asked questions
What does the LET function do in Excel?
LET assigns names to values or intermediate results inside one formula, then uses those names in a final calculation. It shortens formulas, reduces repetition, and can speed up calculation.
Do LET names work in other cells?
No. Names created by LET exist only inside that one formula. To reuse a name across the workbook, use the Name Manager instead.
Can LET make formulas faster?
Yes. When a value or range is used several times, LET evaluates it once and reuses the result, which can reduce recalculation work in heavy formulas.
Which Excel versions support LET?
LET is available in Microsoft 365 and recent perpetual versions of Excel. Older versions return a #NAME? error.
Can I nest LET inside another formula?
Yes. LET can be used as part of a larger formula, and you can also place other functions inside its value arguments.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. LET reference