Table of Contents
Excel's LET function assigns names to values or calculations inside a formula. It is especially useful when a long expression repeats the same work: define that expression once, then refer to it by a descriptive name. It improves clarity, but does not necessarily make a formula shorter.
LET syntax
=LET(name1, value1, final_calculation)Add more name/value pairs before the final calculation when needed:
=LET(price, 1000, quantity, 3, price*quantity)This returns 3000. Here, price and quantity exist only within that LET formula. They do not create reusable workbook names. Microsoft's LET reference lists supported versions, including Microsoft 365, Excel 2021, and Excel 2024.
Example: calculate a discounted total
Use this cell layout consistently. Labels are in column A and values in column B:
| Cell | Meaning | Value |
|---|---|---|
| B2 | Unit price | 1000 |
| B3 | Quantity | 3 |
| B4 | Discount rate | 10% |

The subtotal is 1000 × 3 = 3000. A 10% discount is 300, leaving a total of 2700. Without LET, you could write:
=(B2*B3)-((B2*B3)*B4)
With LET, give each part a meaning:
=LET(
price, B2,
quantity, B3,
discount_rate, B4,
subtotal, price*quantity,
discount_amount, subtotal*discount_rate,
subtotal-discount_amount
)Define a name before using it in a later pair. The final argument returns the result. B4 must contain 10% or 0.1, not the number 10 or a literal 4. The formula returns 2700 with the values above.

The screenshots illustrate the original example's layout. Use the corrected cell references and formulas in this text when reproducing it.
When LET helps—and when simpler is better
For this small calculation, =B2*B3*(1-B4) is already clear. LET becomes more valuable when repeated lookups, filters, or other intermediate expressions make a formula difficult to inspect. It can avoid recalculating an expression you define and reuse, but do not assume every small formula gains a meaningful speed improvement.
Helper cells may be better when colleagues need to inspect each calculation separately. Review basic formula construction before adding complexity.
Name and check your variables carefully
- Choose descriptive names such as subtotal or discount_rate.
- Avoid spaces and names that look like cell references.
- Follow Excel's defined-name rules; short names such as c conflict with reference conventions.
- Use one naming style consistently and keep names distinct from familiar function names for readability.
LET does not change how cell references behave when copied. Use the appropriate relative or absolute references. If your locale uses semicolons as argument separators, replace the example's commas accordingly.
Test with a zero discount, a normal discount, and a changed quantity. If Excel reports an unknown function or shows a compatibility prefix, confirm that your installed version supports LET before sharing the workbook.
Reader Comments 0
Sign in with email or Google to join the discussion.