Excel’s LET function lets you give names to values or calculations inside a formula, then use those names in the formula’s final calculation. It can make long formulas easier to read and can avoid repeating the same calculation; it is available in Excel 2021 and Microsoft 365.
What LET means in Excel
LET is a worksheet function, not a separate kind of Excel statement or a command you run on its own. You enter it as part of a cell formula. Within that formula, you define one or more names and their corresponding values, then provide a final expression that uses those names.
For example, a formula might name a subtotal and a discount rate, then calculate the amount after the discount. The names exist only inside that LET formula: they do not create workbook-wide named ranges, change cell contents, or affect other formulas. This local scope is useful when you want a meaningful label for an intermediate result without adding helper cells or setting up a name in Name Manager.
The function is especially handy when a formula repeats the same expression several times. Naming that expression once can make the logic easier to inspect and may reduce repeated calculation. It does not automatically make every formula faster, though: performance depends on the formula and the calculations involved.
How LET is structured
LET takes name-and-value pairs, followed by a final calculation. In notation, its structure is LET(name1, name_value1, [name2, name_value2, ...], calculation). The square brackets in this description mean that additional pairs are optional; they are not characters to type into a formula. The final argument is required.
Read the arguments from left to right. Excel assigns the first value to the first name, then the next value to the next name, and so on. The final calculation can use names defined earlier in the same LET. Each name must be followed by its value, and the calculation comes last. LET can contain as many as 126 name-value pairs, though most formulas need only a few.
- Name: A label you choose for a value or expression, such as
subtotalorunitPrice. - Value: A number, cell reference, text value, or calculation assigned to that name.
- Calculation: The result Excel returns from the LET formula, using the defined names as needed.
Choose descriptive names without spaces, and avoid names that could be mistaken for cell references, such as A1. A name is not text in quotation marks: it is a local identifier. Excel evaluates the formula in the context of the worksheet, so names can refer to cells and ranges as well as other calculations.
Entering a LET formula
On Excel for Microsoft 365 on Windows, click the cell where you want the result, type the formula beginning with =LET(, enter the name-value pairs and final calculation, and press Enter. You can also start typing =LET and use Excel’s formula autocomplete to help identify the function. The same basic formula-writing process applies in current Excel for Mac and Excel for the web; the exact interface and keyboard shortcuts differ, but the function’s arguments work the same way.
In the following example, B2 contains a unit price of 12.50 and C2 contains a quantity of 4. The formula returns 50:
With the unit price in B2 and the quantity in C2, enter =LET(unitPrice,B2,quantity,C2,unitPrice*quantity). The result is 50, because 12.50 multiplied by 4 equals 50.
Notice the sequence: unitPrice is paired with B2, quantity with C2, and the final expression multiplies the two names. You could write =B2*C2 for this simple example, but the named version shows the structure that becomes useful when a formula has more steps or repeats calculations.
Excel’s formula argument separator depends on regional settings. The examples here use commas, as in the standard English-language syntax. If your Excel expects semicolons, you may need to replace the commas with semicolons when entering a formula. Do not change the order of the arguments.
Practical LET examples
Suppose B2:B6 contains five line-item amounts totaling 250. You want to apply a 10% discount. Naming the subtotal and rate makes the calculation’s purpose visible:
With the amounts in B2:B6, enter =LET(subtotal,SUM(B2:B6),discountRate,10%,subtotal*(1-discountRate)). The result is 225: 250 multiplied by 90% equals 225.
Here, subtotal stores the result of SUM(B2:B6), while discountRate stores 10%. The final expression uses both names. If the amounts change, the subtotal and final result recalculate. This is an arithmetic example, not financial or tax advice; for real transactions, check the applicable terms with the relevant provider or a qualified professional.
LET can also make nested logic easier to follow. Assume B2 contains a score of 84 and the formula assigns a letter grade using simple thresholds:
With the score in B2, enter =LET(score,B2,IF(score>=90,"A",IF(score>=80,"B",IF(score>=70,"C","Needs review")))). The result is B, because 84 is at least 80 but less than 90.
This example names the input rather than repeating a cell reference. For a more complex grading scheme, you could name intermediate calculations too, but avoid adding labels that do not make the logic clearer. LET is a tool for clarity, not a requirement for every formula.
When LET is useful
Consider LET when a formula repeats the same expression, contains several stages, or is difficult to understand from cell references alone. The local names can act like signposts: a later reader can see what an intermediate value represents instead of having to decode a large nested expression.
- Repeated calculations: Define a frequently used expression once, then refer to its name in multiple parts of the final calculation.
- Long formulas: Label intermediate results such as a subtotal, a lookup result, or a condition before combining them.
- Formula maintenance: A well-named intermediate value can make it easier to adjust logic later and spot which part needs changing.
- Reducing helper cells: Keep intermediate calculations inside one cell when a separate visible calculation column would make the sheet harder to use.
There are limits to that last advantage. Helper columns can be easier to audit, test, or explain to colleagues, especially in a shared workbook. A single, deeply nested LET formula may still be hard to review. Use names that clarify the calculation, and break the work into cells if doing so makes the workbook more transparent.
LET compared with helper cells and named ranges
A helper cell stores an intermediate result on the worksheet. LET stores it only as part of one formula. Helper cells are visible and can be inspected individually, which can help with troubleshooting or reporting. LET keeps a calculation compact and avoids using extra worksheet space, but someone reading the workbook may need to examine the formula to see its intermediate values.
A workbook-level named range or named formula is different again. Names created through Excel’s naming features can be available to other formulas in the workbook, subject to their scope. A LET name is private to the formula where it is defined. If you want a reusable label such as a tax rate or a frequently referenced range, a workbook name may be more appropriate; if you want to label a one-off intermediate calculation, LET is often a better fit.
LET is also distinct from LAMBDA. LET defines names and calculates a result within a formula. LAMBDA lets you define a reusable custom function. They can be used together in some formulas, but LET alone does not create a function that you can call elsewhere.
Availability and version differences
LET is supported in Excel 2021 and Microsoft 365. It is also available in newer Excel releases, including Excel 2024. A workbook containing LET may not calculate correctly in older Excel versions that do not support the function; recipients may see a function error rather than the expected result. If you share a workbook with people using older software, confirm compatibility before relying on LET.
For Excel for Microsoft 365 on Windows, formulas use the same LET structure described above. LET is also supported in current Microsoft 365 Excel for Mac and Excel for the web, though ribbon layouts and some keyboard shortcuts differ by platform. There is no special Windows-only LET syntax. If a formula is rejected, check the Excel version and regional argument separators before assuming the function itself is written incorrectly.
Common LET errors and how to fix them
Many LET errors come from argument order or name rules. When a formula fails, check its structure from left to right instead of changing several parts at once.
- Missing a name or value: Every name needs a corresponding value. Check that the arguments alternate correctly before the final calculation.
- Putting the calculation too early: The final calculation must be the last argument. Any additional name-value pairs must come before it.
- Using a cell-reference-like name: Names such as
A1can be interpreted as references and are not suitable. Use a descriptive label such asfirstScoreinstead. - Typing spaces in a name: A LET name cannot contain spaces. Use a single word or a label such as
netAmount. - Using the wrong separator: If Excel marks the formula as invalid, your regional settings may require semicolons rather than commas between arguments.
- Opening the file in an older version: Unsupported Excel versions may not recognize LET. Ask the workbook’s recipient to use a compatible version or replace the formula with a compatible approach.
Also check parentheses in nested functions such as IF. Excel’s formula bar and colored argument cues can help show where a function’s arguments begin and end. If a formula is difficult to debug, temporarily simplify it or put an intermediate calculation in a helper cell, verify the result, and then rebuild the LET formula.
Frequently Asked Questions
Is LET a formula or a statement in Excel?
LET is an Excel worksheet function used inside a formula. It is not a standalone statement, a VBA command, or a worksheet-wide variable declaration.
Does LET make a formula calculate faster?
It can avoid repeating the same expression and may improve calculation efficiency in some cases, as well as making a formula easier to read. It is not a universal speed boost; the effect depends on the calculation and workbook.
Can I use a LET name in another cell?
No. A LET name is local to the formula in which it is defined. To reuse a name across formulas, create a workbook-level name or use a cell reference, depending on what you need.
Why does Excel say there are too few arguments?
Check that each name has a value, that the final calculation is present, and that the arguments are separated using the separator your Excel installation expects. A misplaced comma or semicolon can change how Excel reads the pairs.
Can LET work with other Excel functions?
Yes. Names can represent values produced by functions such as SUM or IF, and the final calculation can use other worksheet functions. The same version requirements for LET still apply even when the other functions are familiar.
Related
- Excel Mini Calendar and Date Picker: Your Options
- Excel Min Sec Format: Display Minutes and Seconds
- Small Excel Table: Create, Format, and Use One
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- XLOOKUP Excel Column Index: What Replaces It?XLOOKUP does not use a column index number. Instead, you give it the range or array to search…
- Excel Insert a New Row and Keep FormulasTo insert a row in Excel and keep formulas, select the row number where the new row should…
- Excel Extract Date from DateTime: Formulas and FixesTo extract the date from an Excel date-time value in cell A2, enter =INT(A2). The formula removes the…
- Round Excel Numbers to the Nearest Integer with FormulasTo round a number to the nearest whole number in Excel, use the ROUND function with zero decimal…
- Median Formula for Class 10: Examples and StepsThe median is the middle value after data has been arranged in order. For ungrouped data, use the…
- How to Add a Formula in an Excel ColumnTo add a formula to an Excel column, enter it in the first row that needs a result,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.