MAP Function in Google Sheets: Syntax and Examples

MAP applies a LAMBDA calculation to each position in one or more arrays. It returns one output per position, without copying a formula down.

MAP function syntax

=MAP(array1, [array2, ...], LAMBDA)
  • Arrays: matching dimensions.
  • LAMBDA: one named input per array and one result per position.

Set up the example data

Enter this small dataset starting in A1. The first row contains headers. Keep the formula output separate from the input cells.

ValueRateName
100.1aLEX GREEN
200.2BLAIR LEE
300.15casey reed

Double every value

Enter this formula in A10. MAP passes each value to x and returns twice that number. Leave three output rows clear.

=MAP(A2:A4,LAMBDA(x,x*2))

Result: 20; 40; 60.

MAP example in Google Sheets, showing 20; 40; 60 in the selected output.

Apply a custom expression

The LAMBDA expression squares each input and adds one. Replace that expression with the per-value calculation you need.

=MAP(A2:A4,LAMBDA(x,x^2+1))

Result: 101; 401; 901.

Combine two parallel arrays

Each call receives the value and rate from the same position. The two parameter names correspond to the two input arrays in order.

=MAP(A2:A4,B2:B4,LAMBDA(p,r,p*r))

Result: 1; 4; 4.5.

Change capitalization

PROPER capitalizes each word. It is a formatting rule, not a reliable correction for every person’s name.

=MAP(C2:C4,LAMBDA(n,PROPER(n)))

Result: Alex Green; Blair Lee; Casey Reed.

Create conditional labels

The IF runs separately for each value. A blank input needs an explicit blank branch if it should not be treated as a score.

=MAP(A2:A4,LAMBDA(s,IF(s>=20,"Pass","Fail")))

Result: Fail; Pass; Pass.

Keep each mapped calculation scalar

Google documents one value per mapped position and says nested arrays are unsupported. Our horizontal-array experiment nevertheless returned a two-column result; a vertical-array variation failed.

=MAP({1;2},LAMBDA(x,{x,x}))

Result: 1, 1; 2, 2.

Other Google Sheets articles you may also like