REDUCE function - Zoho Sheet - Help Guide

REDUCE

Returns a single value by applying LAMBDA to each value in a given array and returning total value in the accumulator.
 
Syntax
 
REDUCE([initial_value]; array; lambda(accumulator; value; calculation))
initial_value: The start value for accumulator. Eg., 1
array: The array given as input. Eg., A2:A8
lambda: The function to be applied to each value in the given array.
accumulator: The total value returned as result. Eg., a
value: A variable indicating the values to be used in calculation. Eg., b
calculation: The calculation used on each value in the array. Eg., a+b
 
Examples

Formula
Result
=REDUCE(1;A2:A8;LAMBDA(a;b;a+b))
158
=REDUCE(1;{1;3;5;7;9};LAMBDA(a;b;a*b))
945
 
Get a hands-on experience of the function in the embedded range below.



Possible Errors
 
Errors
Meaning
#NAME!
  • The function name is incorrect or invalid.
  • The given defined name (if any) is invalid.
  • There is a typo in the defined name used in the function.
  • Double quotes are missing for text values in the function.
  • Colon missing in a cell range reference.
#VALUE!
  • The given argument's data type is incorrect or invalid.
#REF!
  • The given cell reference is incorrect or invalid. This error may occur when a cell/range has been deleted, moved, or pasted over.
#NUM!
  • The given array is too large.
 
Similar Functions
  • BYCOL
  • BYROW
  • ISOMITTED
  • LAMBDA
  • MAKEARRAY
  • MAP
  • SCAN