REDUCE
Reduces an array to an accumulated value by applying a LAMBDA to each value and returning the total value in the accumulator
Syntax
REDUCE([initial_value], array, lambda)
Parameters
- initial_value: Optional. Sets the starting value for the accumulator
- array: Required. An array to be reduced
- lambda: Required. A LAMBDA that takes two parameters (accumulator, value) and returns the new accumulator value
Example
=REDUCE(0, A1:A5, LAMBDA(acc, val, acc + val))