Reduces an array to an accumulated value by applying a LAMBDA to each element.
Esta función funciona igual en Google Sheets que en Excel: misma sintaxis y mismos argumentos.
REDUCE(initial_value, array, lambda)The REDUCE function iterates through an array and applies a custom LAMBDA function to accumulate a single result. It maintains an accumulator that updates with each step, starting from the initial value provided.
=REDUCE(0, {1,2,3}, LAMBDA(a, b, a + b))Resultado: 6
Sums the numbers in the array by starting at 0 and adding each element.
REDUCE returns only the final accumulated result, whereas SCAN returns an array of all intermediate values.