Excel LAMBDA vs LET: Differences, Uses, and Examples

Formulas & functions · Updated November 19, 2026

Excel’s LET function gives names to values inside one formula, while LAMBDA lets you define a reusable function with inputs and a calculation. Use LET to make a formula easier to read or avoid repeating work; use LAMBDA when you want to turn a calculation into a function you can call elsewhere in the workbook.

The core difference between LET and LAMBDA

LET is a formula-organizing tool. It creates names that exist only while Excel evaluates that particular formula. Those names can represent cell values, calculations, or intermediate results, and the formula ends with the result Excel should return.

LAMBDA is a function-building tool. It accepts parameters, performs a calculation using them, and returns a result. You can call a LAMBDA directly in a formula or give it a name in the workbook so it behaves more like a built-in function.

The two functions are related but not interchangeable. LET does not create a workbook-wide custom function, and LAMBDA does not automatically make a complicated calculation easier to understand. In practice, LAMBDA often uses LET inside its calculation: LAMBDA defines the reusable operation, and LET gives that operation readable intermediate names.

  • Use LET to name parts of a formula used in one place.
  • Use LAMBDA to package a calculation for repeated use with different inputs.
  • Use both when you want a reusable function whose internal steps are clearly named.

How LET works inside a formula

LET follows this pattern: a name, the value assigned to that name, another name, its value, and finally the calculation to return. The last argument is the result, not another name-value pair. Names are local to the formula; another cell cannot use a LET name unless its own formula defines it too.

For example, with revenue in B2 and cost in C2, and B2 containing 250 and C2 containing 175, this formula calculates the profit margin:

=LET(revenue,B2,cost,C2,profit,revenue-cost,profit/revenue)

It returns 0.3, or 30% if the result cell is formatted as a percentage. The names revenue, cost, and profit make the calculation easier to follow than repeating references or embedding the subtraction directly in a longer expression. LET can also avoid calculating the same expression multiple times within that formula.

LET is especially useful when a formula has several stages, such as extracting a value, applying a condition, and then calculating a final result. It does not change the workbook’s data or create a reusable function; it only structures the expression being evaluated in that cell.

How LAMBDA creates a reusable function

A LAMBDA has parameters followed by a calculation that uses them. For instance, to calculate the area of a rectangle, with no worksheet cell layout assumed for the definition because the inputs are named parameters, the definition is:

=LAMBDA(width,height,width*height)

A LAMBDA entered by itself in a cell is not yet a completed result: it describes a function but has not been given values to work with. For a quick one-off call, with width 8 and height 5 supplied as arguments, use:

=LAMBDA(width,height,width*height)(8,5)

The result is 40. For repeated use, define a workbook name such as RECTAREA for the LAMBDA. In Excel for Microsoft 365 on Windows, open Formulas > Name Manager > New, enter RECTAREA as the name, and enter the LAMBDA definition in the Refers to box. Once defined, with width in B2 and height in C2, use:

=RECTAREA(B2,C2)

That call returns 40 when B2 is 8 and C2 is 5. The name makes the calculation easier to reuse and gives the formula a meaning that a user can recognize. The named function belongs to the workbook, so it can be used in other formulas in that workbook, subject to Excel version support.

Using LET and LAMBDA together

LET can name intermediate calculations inside a LAMBDA, while the LAMBDA parameters supply the values that vary from call to call. This can make a custom function easier to maintain when its calculation has more than one step.

For example, suppose a reusable function should calculate a price after a percentage discount. With no worksheet layout assumed for the function definition, create a named function such as NETPRICE using:

=LAMBDA(price,discount,LET(savings,price*discount,price-savings))

The LAMBDA parameters are price and discount. Within its body, LET names the intermediate amount savings, then returns the original price less that amount. With the original price in B2 and discount rate in C2, where B2 is 80 and C2 is 0.25, the call is:

=NETPRICE(B2,C2)

The result is 60. Here, LAMBDA makes the operation reusable, while LET explains how the answer is calculated. For a short, obvious expression, nesting both functions may add unnecessary complexity; use the combination when the named steps genuinely clarify the logic.

Choosing the right function for the job

Start with the question of scope: does the calculation need a name only within one formula, or should other formulas be able to call it? A local, one-formula calculation points to LET. A repeated calculation with variable inputs points to LAMBDA, usually saved as a named function.

  • Choose LET when a formula repeats the same expression, has several intermediate steps, or would benefit from descriptive names.
  • Choose LAMBDA when the same business rule or calculation appears in multiple cells and should be maintained in one definition.
  • Choose a named LAMBDA with LET when a reusable calculation is complex enough to need internal labels.
  • Choose neither when a simpler built-in function already expresses the task clearly. A custom function is not automatically better just because Excel supports it.

Consider how other people will use the workbook, too. A function called RECTAREA can be more self-explanatory than repeating a multiplication formula across a report. But if collaborators use an Excel version without LAMBDA support, that named function may not calculate for them. A LET formula may be more compatible with older supported releases, but its names do not make a function available to other cells.

Common errors and troubleshooting

Errors often come from confusing a function definition with a function call. An uncalled LAMBDA in a cell can return #CALC!, because Excel has a function but no supplied arguments to evaluate. Add arguments to invoke it directly, or call a saved name such as RECTAREA with the required inputs.

A LAMBDA call with the wrong number of arguments can return #VALUE!. Check that the call supplies one value for every parameter in the definition, in the same order. If a named LAMBDA produces an unrecognized-name error, check the spelling of the function name and confirm that it was created in Name Manager in the workbook where you are calling it.

LET errors commonly involve mismatched name-value pairs or a missing final calculation. Check that every local name is followed by its value and that the last argument is the result to return. Choose clear names that Excel accepts as names rather than text that could be mistaken for a cell reference. The formula bar is also a useful place to check commas and parentheses when a formula is rejected.

Recursive LAMBDAs, which call themselves, are possible but are an advanced use. A faulty recursive function can continue until Excel reaches its calculation limit and returns an error. For routine spreadsheet work, start with a non-recursive function and test it with simple inputs, including boundary cases, before filling it through a large range.

Version and sharing considerations

LET is available in Excel 2021 and Microsoft 365. LAMBDA requires Microsoft 365 or Excel 2024. If a workbook containing either function is opened in an Excel release that does not support it, a user may see an unsupported-function error rather than the intended result. Check the versions used by everyone who must edit or calculate the workbook before adopting these functions in a shared template.

On Windows, the Name Manager path for defining a named LAMBDA is Formulas > Name Manager > New. Mac and Excel for the web have different interface layouts, so the exact controls may differ, but the underlying function and workbook-name concept are the same where LAMBDA is supported. If menu locations are not immediately apparent, use the application’s search or help to locate Name Manager or the name-definition controls.

A named LAMBDA is stored with the workbook, not installed as a new Excel feature for every workbook. If someone receives a workbook with a custom function, they generally need that workbook’s definition to use it. Document unusual parameters or assumptions in the workbook, and test the named function in the version and platform your audience uses.

Frequently Asked Questions

Is LAMBDA better than LET in Excel?
Neither is universally better. LET improves the structure of a single formula; LAMBDA creates a function that can be called repeatedly. Use the one that matches the scope of the calculation.

Can I use LET inside LAMBDA?
Yes. LET can appear in a LAMBDA’s calculation to assign names to intermediate values. This is useful when a reusable function contains multiple steps, but it is optional for a simple calculation.

Does LET create a named function?
No. LET names values only inside the formula where they are declared. To create a reusable custom function, define a LAMBDA and, if you want to call it by a workbook name, add that definition in Name Manager.

Why does my LAMBDA return #CALC!?
A common reason is that the formula defines a LAMBDA but does not call it with arguments. Add a call with the required inputs, or save the definition as a name and use that name with arguments.

Can I share a workbook that uses LAMBDA?
Yes, but recipients need an Excel version that supports LAMBDA to calculate it properly. The named function definition is part of the workbook; it is not a separate function automatically added to every workbook they open.

Which should I learn first, LET or LAMBDA?
LET is a useful starting point because it teaches you to break a long formula into named steps. Learn LAMBDA when you have a calculation you want to reuse or turn into a workbook-specific function.

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.