How to Use the LET Function in Excel
Introduction
You write a formula that multiplies quantity by price, checks the result against three discount tiers, and applies the right rate. The same multiplication ends up scattered across the formula because every step needs it. The LET function lets you calculate a value once, give it a name, and reuse that name throughout the rest of the formula.
The Dataset
Here's an order table for a small office supplier:
| A | B | C | |
|---|---|---|---|
| 3 | Product | Qty | Price |
| 4 | Laptop Stand | 25 | 120 |
| 5 | USB Hub | 60 | 45 |
| 6 | Monitor Arm | 10 | 200 |
| 7 | Desk Mat | 150 | 30 |
| 8 | Cable Kit | 40 | 85 |
The discount tiers are based on each product's subtotal (quantity times price):
| Subtotal | Discount |
|---|---|
| Over $4,000 | 15% off |
| Over $2,500 | 10% off |
| $2,500 or below | Full price |
The Problem Without LET
Without LET, the formula for the discounted total in D4 looks like this:
=IF(B4*C4>4000, B4*C4*0.85, IF(B4*C4>2500, B4*C4*0.9, B4*C4))
The expression B4*C4 appears five times. That's the same multiplication repeated just to check thresholds and apply discounts. The formula also takes longer to read because you have to confirm that each B4*C4 is really the same thing and not a typo.
LET
LET assigns names to intermediate calculations inside a formula. You pick a name, give it a value, and then reference that name in the final expression. The syntax is:
=LET(name1, value1, [name2, value2, ...], calculation)
- name1: A name you choose (like a variable).
- value1: The expression assigned to that name.
- calculation: The final expression that uses your named variables.
Here's the discount formula rewritten with LET:
=LET(subtotal, B4*C4, IF(subtotal>4000, subtotal*0.85, IF(subtotal>2500, subtotal*0.9, subtotal)))
The multiplication B4*C4 now appears once. Everywhere else, the formula refers to subtotal. If the column layout changes, you update one reference instead of five.
| Product | Qty | Price | Discounted Total |
|---|---|---|---|
| Laptop Stand | 25 | 120 | 2,700 |
| USB Hub | 60 | 45 | 2,430 |
| Monitor Arm | 10 | 200 | 2,000 |
| Desk Mat | 150 | 30 | 3,825 |
| Cable Kit | 40 | 85 | 3,060 |
Laptop Stand comes to 3,000 (25 x 120), which lands in the 10% tier: 3,000 x 0.90 = 2,700. Desk Mat hits 4,500, clearing the 15% threshold, so it drops to 3,825. Monitor Arm stays at 2,000 because it falls below the $2,500 cutoff.
Key takeaway: LET doesn't change what a formula returns. It changes how many times Excel calculates the same expression. Name it once, reuse it everywhere, and both readability and performance improve.
Multiple Variables
LET accepts more than one name-value pair. You can chain variables so that later ones build on earlier ones.
To move the discount logic into its own variable, define both the subtotal and the rate:
=LET(subtotal, B4*C4, rate, IFS(subtotal>4000, 0.85, subtotal>2500, 0.9, TRUE, 1), subtotal * rate)
Now the formula reads in three clear steps: calculate the subtotal, determine the rate, multiply them together. Each variable has one job, and the final calculation is just subtotal * rate.
| Product | Subtotal | Rate | Discounted Total |
|---|---|---|---|
| Laptop Stand | 3,000 | 0.90 | 2,700 |
| USB Hub | 2,700 | 0.90 | 2,430 |
| Monitor Arm | 2,000 | 1.00 | 2,000 |
| Desk Mat | 4,500 | 0.85 | 3,825 |
| Cable Kit | 3,400 | 0.90 | 3,060 |
You can now see each intermediate step at a glance, and the discount logic lives in one place instead of being tangled into the IF chain.
When to Use LET
LET is worth reaching for when:
- A sub-expression repeats. Any calculation that appears more than once is a candidate. The more complex the expression, the bigger the payoff.
- The formula is hard to follow. Naming intermediate steps turns a dense formula into something closer to pseudocode, where each line does one thing.
- Performance matters on large datasets. Excel evaluates each named variable once, not every time the name appears. On complex formulas over thousands of rows, that difference adds up.
For static values that stay the same across the entire workbook, like a tax rate stored in a single cell, named ranges are a better fit. LET is for calculations that change from row to row inside a single formula.
Conclusion
LET gives you named variables inside a formula, turning repeated calculations into a single reference. The result is formulas that are shorter, easier to audit, and faster on large datasets.
For the IFS function used in the multi-variable example, see our guide on IFS and SWITCH. For naming values at the workbook level instead of inside a formula, check out our guide on named ranges.
Level up your Excel skills
Bite-sized lessons, drills, and daily challenges to build real spreadsheet skills.