# REDUCE Function

> Reduce an array to one value with a LAMBDA accumulator using REDUCE in TX Sheet Control: start value, the two LAMBDA parameters and the #VALUE! error.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > REDUCE Function
- **244 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/reduce/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/reduce/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/reduce/llms-full.txt

---

Reduce an array to a single value by applying a LAMBDA to each element in turn. `array_or_initial` is the start value of the accumulator (empty when omitted), `array_or_lambda` the array, and `lambda` a LAMBDA with two parameters, the accumulator and the current element, whose result becomes the new accumulator. A third argument that is not a LAMBDA with two parameters returns `#VALUE!`. [SCAN](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/scan/llms-full.txt) returns every intermediate value instead.

### Syntax

```text
REDUCE(array_or_initial, array_or_lambda, lambda)
```

Category: Logical. Minimum arguments: 3. Maximum arguments: 3.

Available for supported offline calculation.

### Examples

```text
=REDUCE(0,{1,2,3},LAMBDA(acc,x,acc+x))
```

The formula returns 6, the sum of 1, 2 and 3.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [RECEIVED Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/received/llms-full.txt)
- **Next:** [REGEXEXTRACT Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/regexextract/llms-full.txt)
