Function · LAMBDA

Excel LAMBDA function

The Excel LAMBDA function defines a custom function. LAMBDA(price, rate, price*rate) called with 49 and 8.25% returns 4.0425. Save it in the Name Manager to call it by name.

Microsoft 365 and Excel 2024, including Excel for the web. Also in Google Sheets. Excel 2021 does not have it.

Syntax =LAMBDA([parameter, ...], calculation)

LAMBDA
=LAMBDA(price,rate,price*rate)(49,0.0825)

Arguments

NameRequiredWhat to pass
parameterOptionalA name for one input. You can take up to 253 parameters. A LAMBDA with no parameters is allowed.
calculationRequiredThe last argument. It is the result, and it can use the parameter names.

Examples

A tax function called immediately on $49 at 8.25%

=LAMBDA(price,rate,price*rate)(B1,B2)

Result $4.0425

=LAMBDA(price,rate,price*rate)(B1,B2)B3
Tax
AB
1Price49
2Rate8.25%
3Tax4.0425
A picture of the sheet, not a live calculator. To reuse it, define the name Tax as =LAMBDA(price,rate,price*rate) and then call =Tax(B1,B2).

LAMBDA builds a function. The parameters are price and rate, and the calculation is price times rate. Writing (B1,B2) immediately after it calls that function on $49 and 8.25%, which returns 4.0425. Leave the call off and the cell is #CALC!, because a function that was never called has no value.

The useful form is a named LAMBDA. In the Name Manager, the name Tax can refer to =LAMBDA(price,rate,price*rate). Cells then call =Tax(B1,B2). LET only names values inside one formula. LAMBDA names a function other formulas can call. An optional parameter is written in brackets, as in LAMBDA(price,[rate],price*rate). ISOMITTED is TRUE when the caller left that argument out. MAP, BYROW, BYCOL, REDUCE, SCAN, and MAKEARRAY take a LAMBDA as an argument. BYCOL(B2:E10, LAMBDA(column, SUM(column))) sums each column of the city sales on that page, $16,080, $19,200, $17,850, and $19,690. Excel 2021 has LET and does not have LAMBDA or ISOMITTED.