Syntax
| Parameter | Description |
|---|---|
| [parameter1 | (Optional.) Parameter of the LAMBDA function. |
| ...] | Parameter of the LAMBDA function. |
| calculation | Parameter of the LAMBDA function. |
Examples
Inline custom function
=LAMBDA(celsius, celsius*9/5+32)(100)
Reusable named function
=CtoF(37)
Multi-parameter LAMBDA
=LAMBDA(price, tax, qty, price*(1+tax)*qty)(29.99, 0.08, 3)
Common Errors
Wrong number of arguments passed to the LAMBDA. If it expects 2 parameters but receives 3, you get this error.
The LAMBDA body returns an error, or recursive LAMBDAs exceed the call depth limit.
Tips
Go to Formulas > Name Manager > New Name, enter a name like 'CtoF', and set the formula to =LAMBDA(c, c*9/5+32). Now =CtoF(100) works everywhere.
These array functions require a LAMBDA as input. Master LAMBDA first, then MAP/REDUCE become intuitive.
In LAMBDA(a, b, a+b), the last expression (a+b) is the return value. Everything before it is a parameter name.
Try LAMBDA in Viztab
Import your data and use LAMBDA with 370+ other formulas. No signup required.
Open Viztab