Back to functions
Logical2026-11-221 related article

LET Function in Excel

Give names to values or calculations inside a formula, then use those names to return a result.

Syntax

LET(name1, name_value1, calculation_or_name2, [name_value2, calculation_or_name3...])
Table of Contents

Arguments

name1

Required

First name; must start with a letter and not conflict with range syntax.

name_value1

Required

Value assigned to name1.

calculation_or_name2

Required

Final result calculation, or another name requiring its value and a later final result.

name_value2

Optional

Value for the second name; required when a second name is supplied.

calculation_or_name3

Optional

Final result or third name; any further name requires its value and a final calculation.

What it returns

The result of the final calculation.

What LET does

LET gives a value or calculation a name inside one formula. You can then use that name in the final calculation, making a repeated expression easier to follow. The name belongs to that LET formula; it doesn't create a workbook name.

Start with a name and its value, add any other name/value pairs you need, and finish with the calculation you want Excel to return.

Practical examples

Calculate a price including a rate

This example supplies its inputs directly: a price of 80 and a rate of 7.5%. Enter the formula in any empty cell:

=LET(price,80,rate,7.5%,price*(1+rate))
Formula

The expected result is 86. LET assigns 80 to price and 7.5% to rate, then calculates 80 × 1.075. The last argument returns the price including the rate.

Name a sales total before checking a discount

Enter this source data in A1:C8:

RegionProductSales
NorthTea120
SouthTea90
NorthCoffee150
NorthAccessories40
SouthCoffee110
NorthTea80
SouthTea130

Put North in E2, Tea in F2, the threshold 200 in K2, and the discount rate 10% in L2. In H2, enter:

=LET(total,SUMIFS($C$2:$C$8,$A$2:$A$8,E2,$B$2:$B$8,F2),IF(total>=$K$2,total*$L$2,0))
Formula

The expected result is 20. SUMIFS finds the two North/Tea sales, 120 and 80. LET names their sum total. IF checks whether 200 meets the threshold and returns 200 × 10%.

You can use total in both the comparison and the discount calculation without writing SUMIFS twice. The LET walkthrough compares the original formula with this version and shows how to return the intermediate total while checking your work.

Common mistakes and notes

Finish with a calculation

The final argument must return a result. A name/value pair alone isn't a complete LET formula. You need at least one pair, and LET supports up to 126 pairs.

The optional arguments in the syntax allow more pairs. Once you supply another name, its value and a later final calculation are required.

Choose names Excel can recognize

Names must start with a letter and must not conflict with range references. Use a descriptive name such as total. Microsoft flags c as a potential conflict with R1C1 reference syntax, so avoid it even if your Excel setup accepts it.

Keep formula names separate from reusable functions

The names exist only inside their LET formula. Copying the formula creates another calculation with its own names; relative cell references still move as usual. For a calculation you want to call by name elsewhere in a workbook, see LAMBDA.

Check the calculation you assigned

Naming an expression doesn't correct its logic or hide its errors. In the sales example, >= includes a total exactly equal to the threshold. Change the threshold to 201 and the North/Tea discount becomes 0.

Related functions

Related articles

Deep dives, troubleshooting guides, and practical examples that use LET.

Official documentation