1. Home
  2. Functions
  3. Array
  4. MAP

MAP function

Applies a LAMBDA to each value of one or more arrays and returns the results.

Syntax

=MAP(array1, lambda, ...)

Arguments

ArgumentRequiredDescription
array1RequiredAn array or range
lambdaRequiredA LAMBDA with one parameter per array (last argument)

How to use MAP

When MAP returns more than one value, the result spills into the cells below and to the right. Keep those cells empty, or you get #SPILL!.

MAP takes 2 required arguments, and accepts more values in the same pattern. Type =MAP( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=MAP({1,2,3}, LAMBDA(x, x*10))Result 1 by 3 array
Spilled result
ABC
1102030
=MAP({1,2}, {3,4}, LAMBDA(a, b, a+b))Result 1 by 2 array
Spilled result
AB
146

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.