==REDUCE([initial_value], array, lambda)
=REDUCE(0,{1,2,3,4,5},LAMBDA(a,b,a+b))
This example demonstrates the simplest use of the REDUCE function. It adds all values in a list of numbers using the formula. In this example, the REDUCE function returns 15.
=REDUCE(1,{1,2,3,4,5},LAMBDA(a,b,a*b))
The REDUCE function can also be used for multiplication. This formula multiplies all values in a list of numbers and returns 120.
The REDUCE function is used to reduce an array by applying a LAMBDA function to each value. The LAMBDA takes three arguments and the result is returned as the accumulated value with an initial_value set as the starting value.