Array

MAP Formula

Applies a LAMBDA function to each element of one or more arrays and returns an array of results. MAP is the spreadsheet equivalent of 'apply this transformation to every value' — perfect for converting units, formatting strings, applying conditional logic, or any element-wise operation across a range.

Syntax

MAP(array, lambda)
ParameterDescription
array Parameter of the MAP function.
lambda Parameter of the MAP function.
Try MAP in Viztab — free, no signup

Examples

Double every value

Formula
=MAP(A1:A10, LAMBDA(x, x*2))
Returns an array with each value from A1:A10 multiplied by 2. If A1 is 5, the first result is 10.

Classify grades

Formula
=MAP(B2:B50, LAMBDA(score, IF(score>=90,"A",IF(score>=80,"B",IF(score>=70,"C","F")))))
Converts each numeric score in B2:B50 to a letter grade. No helper column needed.

Two-array MAP

Formula
=MAP(A1:A10, B1:B10, LAMBDA(price, qty, price*qty*(1+0.08)))
Combines two arrays element-wise, calculating price * quantity * 1.08 tax for each row. The LAMBDA receives one element from each array.

Common Errors

#VALUE!

The arrays have different dimensions, or the LAMBDA doesn't accept the right number of parameters (one per input array).

#CALC!

The LAMBDA produces an error for one or more elements.

Tips

Replaces helper columns

Instead of creating a column with a formula and dragging it down, MAP applies the transformation in one cell that spills the results.

Multiple arrays = multiple LAMBDA params

When mapping over 2 arrays, your LAMBDA needs 2 parameters. Three arrays need 3 parameters. Each parameter gets the corresponding element.

Can call other functions

The LAMBDA body can use any function: =MAP(A1:A10, LAMBDA(x, UPPER(LEFT(x, 1))&LOWER(MID(x, 2, 100)))) title-cases each string.

Try MAP in Viztab

Import your data and use MAP with 370+ other formulas. No signup required.

Open Viztab

Related Formulas