Contact

LET Function in Microsoft Excel: Syntax, Examples & Compatibility

Logical Intermediate Microsoft Excel

Learn how to name intermediate formula values to avoid duplicating a calculation in Microsoft Excel. Includes syntax, two verified-by-reasoning results, troubleshooting and portability notes.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: name intermediate formula values to avoid duplicating a calculation in Microsoft Excel. The reproducible examples below use explicit values so the formula’s meaning is testable without a large workbook.

Evidence: The function name and syntax are documented in the linked vendor function reference. Expected outputs were independently reasoned or checked outside the application. These are not native Microsoft Excel test results. A guide being published here does not certify every software release or file-import scenario.

Availability and version history

  • Introduced: Announced March 17, 2020; the earliest numeric build is not established here. Microsoft announcement.
  • Availability: Official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac.
  • Checked: October 14, 2026; official LET reference. Documentation check, not a new native test; existing example-verification notes retain their scope.

Syntax and arguments

=LET(name1, value1, calculation_or_name2, ...)

Define at least one identifier/value pair, up to Microsoft’s documented maximum of 126 pairs, then finish with the calculation that returns the result. Names apply within this LET formula, not as new workbook-wide names. A name starts with a letter and must not conflict with reference syntax; Microsoft specifically permits a but rejects c because of R1C1-style references.

Best use case: Name intermediate formula values to avoid duplicating a calculation.

Set up the example sheet

Imagine invoice calculations with a quantity and unit price. In these self-contained formulas, named values exist only for the duration of the formula.

Enter the formula in an unused cell. For a formula returning several values, leave an unobstructed area where those values can expand. These formulas use comma argument separators in a typical English-language locale; commas or semicolons inside quoted text are data, not argument separators. Adapt the separator if your regional settings require it.

Worked example 1: LET with known input

=LET(price,20,quantity,3,price*quantity)

Expected output: 60.

Within the formula, price is 20 and quantity is 3; the final expression multiplies them.

Worked example 2: a second LET case

=LET(x,4,x^2+1)

Expected output: 17.

The local name x evaluates to 4, so x squared plus one is 17.

Compare both results before replacing literal values or short sample ranges with your own workbook data. For a spilling formula, compare every output cell, not only the top-left result.

Reuse an explicitly named intermediate value

=LET(quantity,3,price,20,subtotal,quantity*price,subtotal+subtotal*0.1)

Expected output is 66: subtotal is 60, and the illustrative 10% addition is 6. A zero quantity yields zero; the local names do not validate a business rule about acceptable quantities or rates.

Naming the intermediate result avoids repeating its defining expression. This is Microsoft’s documented calculation-reuse purpose, not a benchmark that every LET formula runs a fixed number of times faster. The final calculation is still necessary; a list of name/value pairs alone is not a completed LET expression.

Practical advice and troubleshooting

When this formula helps: Names make complex formulas easier to read, but use names that do not look like cell addresses (for example rate rather than r1).

Important edge case: Variable identifiers cannot be valid cell references. The final argument must be the expression to return.

If the result differs, first verify the text-versus-number types of the input cells, the argument separators for your locale, and the range size. For dynamic arrays, inspect occupied cells in the output area. An error that looks like a missing function may reflect a software version rather than incorrect data.

Compatibility and version considerations

Both products document LET, but the exact variable-naming rules and release availability should be checked separately.

Excel LET requires a supported modern Excel release (Microsoft 365/2021/2024); older perpetual Excel may return #NAME?.

Function availability and parameter behavior must be judged for the specific application and release; a function documented in one spreadsheet does not automatically work in another.

Editorial verification: Vendor catalogue referenced as of 2026-10-12. The two example outputs are independently reasoned; no native application run, screenshot, or version-specific output is claimed. Review the editorial testing standards if you require stronger proof before importing a workbook.