Contact

Zoho Sheet REDUCE Function: Explicit Seeds and Custom Totals

Spreadsheet Advanced Zoho Sheet

Build reproducible accumulator calculations with full data, order-sensitive recurrences, source dates and documented limitations.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

REDUCE carries an accumulator through an array and returns only its final value. Use it when each item updates a running state and the endpoint matters: a custom total, a product, a sum of transformed observations, or a small recurrence. It is different from SCAN, which exposes the intermediate states as an array.

Availability and evidence

Zoho lists REDUCE among its six new LAMBDA helpers in the 15-function announcement, linked under March 2023 in its release timeline. This establishes the announcement month, not a numbered cloud build. The current REDUCE reference was checked on October 15, 2026. The last functioning version is unknown; current documentation does not establish mobile or offline parity.

All expected results below were independently calculated from the stated inputs. They are reproducible reference expectations, not results captured from a native Zoho session.

Syntax and an explicit starting state

REDUCE([initial_value]; array; LAMBDA(accumulator; value; calculation))

The first LAMBDA parameter represents the state accumulated so far; the second represents the current input item. The final expression computes the next state. The parameter names are placeholders: the examples use a and b consistently, without referring to worksheet columns A or B.

The help marks initial_value optional but does not state its omitted-value default. Supply it explicitly. Addition normally starts with 0, multiplication with 1, and a balance calculation with its actual opening balance. The initial value is used once, before the first item, rather than being added at every step.

The examples use a single vertical range to make the intended order visible. Two-dimensional traversal, blank/error coercion and nested-array accumulator behavior are not established by the checked entry.

A complete balance dataset

Create BalanceFold. Put Change in A1, then enter 12, -5, 0, 8, 3 in A2:A6. Put Opening_balance in D1 and 100 in D2. Enter in D4:

=REDUCE(D2;A2:A6;LAMBDA(a;b;a+b))

The expected endpoint is 118. This trace explains every update; it is an explanatory table, not extra output produced by REDUCE:

Input cell Change Previous state New state
A2 12 100 112
A3 -5 112 107
A4 0 107 107
A5 8 107 115
A6 3 115 118

In D5 enter =REDUCE(0;A2:A6;LAMBDA(a;b;a+b)), expected 18. D4 includes the opening balance; D5 is only the net change. Confusing those two questions creates a consistent 100-unit discrepancy.

In a copy change A3 to -7. The net change becomes 16 and the closing balance 116. Changing D2 instead from 100 to 200, with the original input rows, gives 218. These controls isolate input changes from seed changes.

Reproduce the official product without hidden cells

Put 1,3,5,7,9 in G2:G6. Enter =REDUCE(1;G2:G6;LAMBDA(a;b;a*b)) in I2. The expected product is 945, matching the explicit odd-number example in Zoho’s reference. Intermediate products are 1,3,15,105,945.

Changing the seed to 0 makes the endpoint 0. That is an arithmetic consequence of the supplied calculation, not a special missing-data rule. Using a worksheet range also avoids depending on array-constant row and column punctuation in a different formula locale.

Advanced: custom transformed totals

Using BalanceFold’s original A2:A6, enter in D7:

=REDUCE(0;A2:A6;LAMBDA(a;b;a+b^2))

The expected sum of squares is 242, from 144+25+0+64+9. Squaring each item before accumulating is different from squaring the total: 18 squared is 324.

For a second calculation put the supplied reference value 3.6 in F2. In F4 enter =REDUCE(0;A2:A6;LAMBDA(a;b;a+(b-$F$2)^2)). The expected squared-deviation total is 177.2. Dividing F4 by the five stated observations gives 35.44. This is a defined arithmetic calculation; the choice of denominator depends on the statistical question and is not made by REDUCE.

Advanced: an order-sensitive recurrence

On a separate sheet put digits 4,0,7,2 in A2:A5. Enter =REDUCE(0;A2:A5;LAMBDA(a;b;10*a+b)) in C2. For the displayed top-to-bottom digit stream, the expected states are 4,40,407,4072, so the endpoint is 4072.

Reversing the entered digits to 2,7,0,4 changes the endpoint to 2704. Reordering the additive balance changes its intermediate path but not its final sum; this recurrence changes its endpoint too. Keep an explicit input order when the operation is not commutative.

This example constructs a number, not a text identifier. A leading zero will not survive as a separate digit in the numeric result, and long identifiers can exceed reliable numeric precision. Keep identifier text unchanged when its exact representation matters.

Errors and checks before reuse

Zoho specifically documents #NUM! when the array is too large, without giving a numeric size threshold in this entry. Its shared glossary covers invalid names, argument types and references. No exact native error is claimed here for a missing LAMBDA parameter, omitted seed, embedded error or empty range.

If a result is unexpectedly zero, check a product’s seed. If it is shifted by a fixed amount, compare the opening state with the intended total. If changing row order changes the answer, inspect the update expression rather than assuming every reduction behaves like SUM. For an ordinary sum or product, a dedicated aggregate can be easier to read; REDUCE is most useful when the state update is genuinely customized.