LAMBDA

LAMBDA(param_or_calc1 [,param_or_calc2])

Returns the results of a formula added as a named range.

param_or_calc1The first parameter or calculation.
param_or_calc2(Optional) The second parameter or calculation.

REMARKS
* For an illustrated example refer to the page under Lambda Functions.
* This function was added in Excel 2024.
* This function can be used to create user defined functions that have a friendly name and can be easily reused.
* The parameter names must not contain any numbers.
* You can use the LET function to return the result of a formula that can use variables.
* You can use the BYCOL function to apply a LAMBDA function to each column in an array.
* You can use the BYROW function to apply a LAMBDA function to each row in an array.
* You can use the GROUPBY function to return the summary table after grouping and aggregating by row.
* You can use the ISOMITTED function to return the value True or False depending whether a LAMBDA function parameter is missing.
* You can use the MAKEARRAY function to create an array calculated by applying a LAMBDA function.
* You can use the MAP function to return an identical array by applying a LAMBDA function to do some processing.
* You can use the PIVOTBY function to return the summary table after grouping and aggregating by row and column.
* You can use the REDUCE function to return a single value after applying a LAMBDA function to an array.
* You can use the SCAN function to return an identical array by applying a LAMBDA function to return some intermediate calculation values.
* link - support.microsoft.com/en-us/office/lambda-function-bd212d27-1cd1-4321-a34a-ccbf254b8b67
* This function was first released in December 2020, but not available in Excel 2021.
* For the Microsoft documentation refer to support.microsoft.com

 AB
1=LAMBDA(p_one, p_one+10)(B1) = 2010
2=LAMBDA(p_one, p_one*10)(B1) = 100 
3=LAMBDA(p_one, p_two, SQRT((p_one^2+p_two^2)))(3, 4) = 5 
4=LAMBDA(p_one, LEN(TRIM(p_one)) - LEN(SUBSTITUTE(TRIM(p_one), " ", "")) + 1)("how many words") = 3 
5=LAMBDA(p_one, [p_two], p_one+p_two)(1,2) = 3 
6=LAMBDA(p_one, [p_two], p_one+p_two)(1) = 1 
7=LAMBDA(p_one, [p_two], p_one*p_two)(1) = 0 

1 - What is 10 plus the number in cell "B1"
2 - What is 10 multipllied by the number in cell "B1".
3 - What is the length of the longest side in a right angled triangle.
4 - What is the total number of words in a text string.
5 - How to declare an optional argument.
6 - How to declare an optional argument. The value is assumed to be zero.
7 - How to declare an optional argument. The value is assumed to be zero.

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top