# MAP Function

> Apply a LAMBDA function to each value of one or more arrays with MAP in TX Sheet Control: one parameter per array, spilled results and the #VALUE! error.

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

---

Apply a LAMBDA function to each value of one or more arrays and return the results as an array of the same size. The arrays come first and the LAMBDA last, with one parameter for each array, so `MAP({1,2},{10,20},LAMBDA(a,b,a+b))` returns 11 and 22. A last argument that is not a LAMBDA, or a LAMBDA whose number of parameters differs from the number of arrays, returns `#VALUE!`.

### Syntax

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

Category: Logical. Minimum arguments: 2. Maximum arguments: 255.

Available for supported offline calculation.

### Examples

```text
=MAP({1,2,3},LAMBDA(x,x*2))
```

The formula returns 2, 4 and 6 in three cells of a row.

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:** [MAKEARRAY Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/makearray/llms-full.txt)
- **Next:** [MATCH Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/match/llms-full.txt)
