What LET does

LET gives names to values or calculations inside a formula, then uses those names in a final calculation. In =LET(amount,B2*C2,IF(amount>=500,0,MAX(12,amount*5%))), the order value B2*C2 is worked out once and called amount, and the rest of the formula uses amount wherever it needs the order value.

Without LET, the same multiplication is written out twice: =IF(B2*C2>=500,0,MAX(12,B2*C2*5%)). With LET it’s written once, so a change happens in one place, and Excel works it out once as well. That saving counts most when the named part is a slow calculation over a long range.

A name exists only inside its own formula. Another cell can’t use it, and two formulas can each have a name called amount without getting in each other’s way.

Syntax

=LET(name1, value1, [name2, value2], ..., calculation)
Arguments in square brackets are optional; the rest are required.
name1Required
The first name, such as amount. It starts with a letter, has no spaces and can't look like a cell address.
value1Required
What the name stands for: a number, a cell, a range or a calculation such as B2*C2.
name2Optional, can repeat
Another name, if you need one. Its value can use the names before it.
value2Optional, can repeat
The value or calculation for that name. One LET takes up to 126 pairs of a name and a value.
calculationRequired
The last argument, the formula that uses the names and gives the result, such as IF(amount>=500,0,amount*5%).

The arguments come in pairs, a name and its value, and the last one is always the calculation that gives the result.

Example: free shipping over $500

An online shop charges shipping at 5% of the order value, at least $12, and ships orders of $500 or more for free. The formula in D2 is filled down to D5.

A-310 comes to $88.50, and 5% of that is under the $12 minimum. A-311 comes to $576, so it ships free. In D2, =LET(amount,B2*C2,IF(amount>=500,0,MAX(12,amount*5%))) returns 12.00.

Read it as: call B2C2 amount; if amount is $500 or more, shipping is 0, otherwise it’s 5% of amount or $12, whichever is more. To change how the order value is worked out, such as taking a discount off first, you edit B2C2 in one place.

Example: a status for late deliveries

A warehouse compares each delivery’s due date with the day it arrived. The number of days late is needed twice, once for the test and once for the label, so LET names it.

D-403 arrived a day early, so late is -1 and it counts as on time. In D2, =LET(late,C2-B2,IF(late<=0,"On time",late&" days late")) returns On time.

Rules for names

  • A name starts with a letter and has no spaces: late, net_price and taxRate all work.
  • It can’t look like a cell address. tax1, q1 and fy2027 are refused, because each is also the address of a cell, in columns TAX, Q and FY.
  • The single letters c and r are refused too, since Excel reads them as a column and a row.
  • Each name can use the names before it, in the order they’re written. The last argument, the calculation, can use them all.
  • One LET holds up to 126 pairs of a name and a value.

LET vs LAMBDA

LET names the steps inside one formula. LAMBDA, in Excel 2024 and Microsoft 365, turns a calculation into a function with a name of its own, saved in the workbook, that any cell can call. A good way to build one is to get the calculation right with LET on real cells first.

Common mistakes

  • =LET(amount,B2*C2) has no calculation at the end, and Excel won’t accept the formula. The last argument always gives the result.
  • =LET(fee,amount*5%,amount,B2*C2,fee) uses amount before it has a value, and the formula shows #NAME?. Define each name before the names that use it.
  • =amount*2 in another cell shows #NAME?, because a LET name exists only inside its own formula. For a name the whole workbook can use, define one with Formulas > Define Name.
  • LET isn’t in Excel 2019 or earlier, where the formula shows #NAME?. There, work each step out in a helper cell and point the final formula at those cells.

Frequently asked questions

What does the LET function do in Excel?

It names values or calculations inside one formula, so each part is written and worked out once. =LET(amount,B2*C2,IF(amount>=500,0,amount*5%)) calls B2*C2 amount and uses the name twice.

Which versions of Excel have LET?

Microsoft 365, Excel for the web, and Excel 2021 or later. Excel 2019 and earlier don’t have it, so the formula shows #NAME?.

Does LET make formulas faster?

It can. A named part is worked out once, however often the formula uses it, so a formula that repeats a slow calculation, such as a FILTER or a lookup over a long range, does less work with LET.

How many names can one LET formula have?

Up to 126 pairs of a name and a value, followed by the calculation.

Can I use a LET name in another cell?

No. The name exists only inside the formula that defines it. To give a value a name the whole workbook can use, go to Formulas and select Define Name.

What is the difference between LET and LAMBDA?

LET names the steps inside one formula. LAMBDA turns a calculation into a function of your own that every cell in the workbook can call, and it needs Excel 2024 or Microsoft 365.