Create custom function
=LAMBDA(parameter, ..., calculation)
| Parameter | Description |
|---|---|
parameter |
An input value for the function. |
calculation |
The calculation to perform as the result of the function. Must be the last argument. |
To illustrate how LAMBDA works, let's begin with a very simple formula:
=x*y // multiply x and y
In Excel, this formula would typically use cell references like this:
=B5*C5 // with cell references
As you can see, the formula works fine, so we are ready to move on to creating a generic LAMBDA formula (unnamed version). The first thing to consider
=LAMBDA(x,y // begin with input parameters
Next, we need to add the actual calculation, x*y:
=LAMBDA(x,y,x*y)
If you enter the formula at this point, you'll get a #CALC! error. This happens because the formula has no input values to work with since there are n
=LAMBDA(x,y,x*y)(B5,C5) // testing syntax
Make sure the formula begins with an equals sign (=). Now that the LAMBDA formula has a name, it can be used in the workbook like any other function.
=XBYY(B5,C5)