FormulaCraft

How to use LAMBDA with REDUCE for cumulative math in Excel and Google Sheets

Topic:LAMBDA (reusable formulas)
Excel & Google Sheets
=REDUCE(0, A2:A6, LAMBDA(acc, x, acc + x * 1.1))

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Enter the values you want to accumulate in A2:A6 (e.g. 100, 200, 150, 300, 250).
  2. 2Choose a starting value (the initial accumulator). Use 0 for sums, 1 for products.
  3. 3In B2, enter =REDUCE(0, A2:A6, LAMBDA(acc, x, acc + x * 1.1)) to sum values each inflated by 10%.
  4. 4The LAMBDA receives two arguments: acc (the running total so far) and x (the current element). The body defines how to combine them.
  5. 5REDUCE returns ONE value — the final accumulator — not an array. Use SCAN instead if you need every intermediate step.

Tips

Need it for your exact data?

Describe your columns in plain English and get the precise formula for your sheet, with the right Excel or Sheets syntax.

Frequently asked

How is REDUCE different from SCAN?

REDUCE returns only the final accumulated result. SCAN returns the accumulator value at every step, giving you the full running history as an array.

Can I use REDUCE to concatenate text?

Yes. Set the initial value to "" and the LAMBDA body to acc & ", " & x. This is slower than TEXTJOIN for simple cases, but REDUCE allows conditional logic (e.g. skip blank cells).

Does REDUCE support 2-D arrays?

REDUCE flattens 2-D ranges row by row, so it processes all cells sequentially. Use BYROW first if you need per-row reductions before a final fold.

More on LAMBDA (reusable formulas)

See all →

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: