Function · LAMBDA

Excel REDUCE function

The Excel REDUCE function folds an array into one value. Starting from 0, the four utility bills add up to $446.35.

Microsoft 365 and Excel 2024, including Excel for the web. Also in Google Sheets. Excel 2021 does not have it.

Syntax =REDUCE(initial_value, array, lambda)

REDUCE
=REDUCE(0,A1:A4,LAMBDA(acc,v,acc+v))

Arguments

NameRequiredWhat to pass
initial_valueRequiredThe starting accumulator. For a sum, use 0. It is not included as an extra item from the array.
arrayRequiredThe values to fold in, one at a time.
lambdaRequiredA LAMBDA with two parameters: the accumulator so far, and the next value. It returns the next accumulator.

Examples

The four utility bills, added with an explicit running total

=REDUCE(0,A1:A4,LAMBDA(acc,v,acc+v))

Result $446.35

=REDUCE(0,A1:A4,LAMBDA(acc,v,acc+v))A5
Bills
A
1143.60
296.20
3118.45
488.10
5446.35
A picture of the sheet, not a live calculator. The result is one cell. SCAN spills each step along the way.

REDUCE walks an array and keeps one running value. Start at 0, add each utility bill, and the finish is $446.35. That is 143.60 + 96.20 + 118.45 + 88.10, the same total behind the average of $111.5875. SUM is shorter when addition is all you want. REDUCE is the form that can carry a different rule, such as a running maximum or a count of bills over $100.

The initial value is the start. It is not spilled and it is not an extra bill. The LAMBDA returns the next accumulator only. SCAN uses the same LAMBDA and spills every step instead of only the last one. MAKEARRAY fills a new grid from the row number and the column number. Excel 2021 does not have REDUCE.