LAMBDA
Creates a custom reusable function.
- Excel: Verified match
- Google Sheets: Verified match
- Returns: Any value
Examples
=LAMBDA(x, y, x + y)(2, 3) Result 5
Syntax
LAMBDA(parameter_or_calculation…) parameter_or_calculation…- any required
Errors
#VALUE!=MAKEARRAY(3, 0, LAMBDA(x, y, y))#ERROR!=SCAN(0, A2:A3, LAMBDA(a, b, a+b), 1)
Related
ARRAY_CONSTRAINTruncates a range to at most the given rows and columns. ARRAYFORMULAEvaluates an expression across a range (this engine already spills, so it is a pass-through for sheets compatibility). ARRAYTOTEXTConverts array to text representation. BYCOLApplies lambda to each column of array. BYROWApplies lambda to each row of array. CHOOSECOLSReturns the specified columns from an array.