Excel LET Function: Make Advanced Formulas Clearer

Formulas & functions · Updated November 18, 2026

Yes—Excel lets you build advanced formulas, and the LET function makes them easier to read by giving names to intermediate calculations. In Excel for Microsoft 365, you can use LET to avoid repeating the same calculation, then use its result in the rest of a formula.

What the LET function does

LET is a worksheet function for organizing calculations inside a single formula. You assign a name to a value or expression, then refer to that name later in the formula. The names exist only while that formula is being evaluated; LET does not create a workbook-wide name or a new function you can call from other cells.

This is useful when a formula repeats a calculation. Without LET, each repeated expression has to be written out again, which makes the formula longer and creates more opportunities for a typo. With LET, you can give the expression a meaningful label such as subtotal, taxRate or qualifyingScores and use that label where needed.

LET can also make a formula easier to check. A reader can follow the named stages rather than deciphering a long string of nested functions. Excel may also avoid calculating a named expression more than once within the same LET formula, which can help with performance in formulas that repeat expensive calculations. It is not, however, a general promise that every formula will calculate faster.

How LET formulas are structured

A LET formula contains one or more name-and-value pairs followed by a final calculation. Each name is followed by the value or expression it represents; the last argument tells Excel what result to return. A later expression can use names defined earlier in the same LET, but a name cannot be used before it is assigned.

For example, a formula could first calculate a subtotal, then calculate a discount amount from that subtotal, and finally return the difference. The following example assumes the unit price is in B2, the quantity is in C2, and the discount rate is in D2. If B2 is 40, C2 is 3 and D2 is 10%, the result is 108.

=LET(subtotal,B2*C2,discountAmount,subtotal*D2,subtotal-discountAmount)

In that example, the subtotal is 120 and the discount is 12, so the final calculation returns 108. The labels make the steps visible, while the input values remain in their ordinary worksheet cells. A useful naming convention is to choose short, descriptive names that explain a calculation without becoming so long that the formula is harder to scan.

Examples of advanced formulas with LET

LET is not limited to arithmetic. It can name a result from one function and use it as the input to another. Suppose B2:B6 contains five order values: 180, 240, 320, 150 and 210. Their total is 1,100. The formula below returns an 8% bonus when the total is at least 1,000, and zero otherwise.

=LET(total,SUM(B2:B6),IF(total>=1000,total*8%,0))

The IF test uses the named total instead of repeating SUM(B2:B6). If the threshold changes, it is easy to identify the condition to edit. The same pattern can be used for other business rules, such as applying one rate above a threshold and another rate below it. The rates and thresholds in this example are illustrative; they are not a recommendation about compensation or other financial decisions.

LET can also organize a calculation that works with a list. If B2:B6 contains the scores 62, 78, 91, 68 and 84, the formula below filters out scores below 70 and averages the remaining values. The qualifying values are 78, 91 and 84, so the result is 84.333333…

=LET(scores,B2:B6,passed,FILTER(scores,scores>=70),AVERAGE(passed))

This example uses FILTER, which returns an array of matching values. LET gives that array a readable name before AVERAGE uses it. If no scores meet the condition, FILTER returns an error unless you supply its optional value-if-empty argument; the formula should account for that possibility if the data could contain no qualifying scores.

When LET is worth using

LET is especially helpful when a formula has repeated expressions, several calculation stages, or nested conditions that are difficult to understand. It is also useful when a worksheet will be maintained by someone else: descriptive names can explain why a calculation is being performed, not just how Excel performs it.

  • Use LET when the same expression appears more than once in a formula.
  • Use it to separate a multi-step calculation into named intermediate values.
  • Use names to clarify what a value represents, such as eligibleAmount or averageScore.
  • Keep a simple formula simple; adding LET to a one-step calculation may make it longer without making it clearer.

LET is local to one formula. If you need a reusable name across many cells, consider a defined name through Formulas > Define Name. If you want to create a reusable custom function from a formula, LAMBDA is the more relevant tool. LAMBDA can be combined with LET, but it serves a different purpose: LET organizes calculations within a formula, while a saved LAMBDA can be called from other formulas.

Common errors and how to avoid them

A frequent source of trouble is an invalid or confusing name. LET names cannot contain spaces and must follow Excel’s rules for names; they also cannot look like a cell reference such as A1. Use simple labels such as unitPrice or item_count, and avoid names that could be mistaken for worksheet references. Names are not case-sensitive, so total and TOTAL are treated as the same name.

Check the order of the arguments if Excel reports a formula error. Each name needs a corresponding value, and the final argument must be the calculation to return. A missing value, an extra comma, or a name used before it is defined can prevent Excel from interpreting the formula as intended.

Another common issue is confusing LET names with cell references. A name such as subtotal is a label within that formula, not a cell address. If Excel displays #NAME?, check spelling, name validity and whether the Excel version supports LET. A #VALUE! or another calculation error may instead come from the underlying expression or data, such as trying to average an empty filtered result.

Formulas in the examples use commas between arguments, as required for the stated syntax. Depending on Windows regional settings, Excel may display or require semicolons as the argument separator. If a comma-separated formula is rejected, check the list-separator setting used by your Excel installation rather than changing the function name.

Availability and compatibility

LET is available in Excel for Microsoft 365 and Excel 2021 or later. Current Excel for Microsoft 365 also provides it on Windows, Mac and Excel for the web. Older editions, including Excel 2019, may not recognize LET, so a workbook containing it can show a name-related error when opened in an incompatible version.

Some newer functions used inside a LET formula have their own compatibility requirements. FILTER, SORT, UNIQUE, SEQUENCE, XLOOKUP, XMATCH and LET are available in Excel 2021 or Microsoft 365. LAMBDA, TEXTSPLIT, TEXTBEFORE, TEXTAFTER, VSTACK and HSTACK require Microsoft 365 or Excel 2024. A formula is only as compatible as its least widely supported function, so check every function it uses before sharing a workbook with people on older releases.

LET does not require a special setting or an add-in. Enter it in a worksheet cell like another formula, beginning with an equals sign. If colleagues use an older Excel version, alternatives include rewriting the repeated calculation directly, using helper cells to show intermediate results, or distributing a version of the workbook that avoids unsupported functions.

How LET compares with helper cells

Helper cells put intermediate calculations in separate worksheet cells. They can make a process visible and easy to inspect, especially when several people need to audit each step or when intermediate values are useful elsewhere. Their trade-off is that they take up worksheet space and may need to be copied or maintained alongside the main calculation.

LET keeps those steps inside one cell. That can make a report layout tidier, but intermediate names are not displayed as separate worksheet results. If a formula is still difficult to understand after adding meaningful LET names, splitting it into helper cells may be the clearer option. The best approach depends on whether compactness or visible calculation steps matter more to the workbook’s users.

Frequently Asked Questions

Does Excel let you use advanced formulas?

Yes. Excel supports complex formulas built from functions, operators, cell references, and arrays. LET can make a multi-step formula easier to read, while functions such as FILTER, XLOOKUP and LAMBDA add other capabilities in supported Excel versions.

What is the LET function used for in Excel?

LET assigns names to values or calculations within one formula, then uses those names in its final calculation. It is most useful for clarifying multi-step logic or avoiding repeated expressions.

Does LET create a name I can use in every cell?

No. A LET name exists only inside the formula where it is defined. For a workbook-level or worksheet-level name, use Excel’s defined-name features; for a reusable custom function, consider LAMBDA where available.

Why does Excel show #NAME? for LET?

The Excel version may not support LET, or the formula may contain a misspelled function or invalid name. LET is available in Microsoft 365 and Excel 2021 or later. Also check whether your installation expects semicolons rather than commas between arguments.

Is LET better than using helper cells?

Not in every workbook. LET keeps intermediate calculations inside one formula, while helper cells expose those calculations on the worksheet. Choose LET for a compact, self-contained formula and helper cells when visible, separately checkable steps are more useful.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.