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
Append text after the inner call returns
=LET(f,LAMBDA(self,n,IF(n=0,"",self(self,n-1)&IF(n>1,"-","")&n)),f(f,A2))The inner call builds the earlier labels, then the caller appends its own separator and number. The expected literal text is 1-2-3-4. This small example illustrates text recursion and caller scope; TEXTJOIN with SEQUENCE is preferable for routine numbering. The first argument passes the function itself explicitly; it is not a workbook name. Native Excel and Sheets recalculation still needs verification.
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 · inside LET
=LET(f,LAMBDA(self,n,IF(n=0,"",self(self,n-1)&IF(n>1,"-","")&n)),f(f,A2))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.