LAMBDA function
Create custom, reusable functions and call them by a friendly name
Use a LAMBDA function to create custom, reusable functions and call them by a friendly name. The new function is available throughout the workbook and called like native Excel functions.
Syntax
LAMBDA([parameter], calculation)Square brackets indicate optional arguments.
Arguments
| Argument | Required | Meaning |
|---|---|---|
| parameter | No · repeats | A value that you want to pass to the function, such as a cell reference, string or number. You can enter up to 253 parameters. This argument is optional.[x, y, …,] |
| calculation | Yes | The formula you want to execute and return as the result of the function. It must be the last argument and it must return a result. This argument is required.x+y |
Try LAMBDA
Define and immediately call a reusable calculation
=LAMBDA(price,quantity,price*quantity)(A2,B2)LAMBDA defines two parameters and a multiplication body. The final (A2,B2) supplies 12 and 4 immediately. A bare LAMBDA definition needs a call or a workbook name before it can return an ordinary cell result.
Inspect the current formula
Read its written arguments or observe actual operation values in a separate local calculation. This action neither applies a draft nor grades an answer.
Read the formula, one argument at a time
Explore the written function calls and their inputs. The calculation result belongs to the complete formula.
LAMBDA · top-level call
=LAMBDA(price,quantity,price*quantity)(A2,B2)1 / 3 · parameter
A value that you want to pass to the function, such as a cell reference, string or number. You can enter up to 253 parameters. This argument is optional.
This position uses a repeatable parameter template from the function reference. The number above identifies its position in this call.
LAMBDA reference ↗Follow the cells behind a result
Read explicit local references and helper formulas using a separate calculation. Your draft stays in this field; the worksheet and practice checks do not change.
The worksheet runs locally. Published checks apply to the supplied example only. Native Excel and Google Sheets compatibility remain unverified.
Practice a complete task
Reference and compatibility
Univer 1.0.4 / Apache-2.0. Calculation checks cover the supplied examples only. The browser worksheet does not implement every Excel feature, external service or connected data type.