MAP Function
The MAP
function in Google Sheets applies a specified LAMBDA
function to each element of one or more arrays.
Syntax
MAP(array1, [array2, ...], LAMBDA)
array1
: The first array to apply the function to.array2, ...
: Additional arrays to apply the function to (optional).LAMBDA
: A custom function to apply to each element.
Examples
- Basic Example
Apply a custom function to add corresponding elements of arrays A1:A3
and B1:B3
:
=MAP(A1:A3, B1:B3, LAMBDA(x, y, x + y))
Notes
- Can handle multiple arrays in parallel.
Related Functions
REDUCE
: Apply a custom function to reduce an array.