MAP Function in Google Sheets

Sometimes you want to apply the same calculation to every value in a list without dragging a formula down. The MAP function in Google Sheets does this in one shot using a LAMBDA.

This article walks through five practical MAP examples, from simple doubling to text formatting and conditional labels.

MAP Function Syntax in Google Sheets

The MAP function takes one or more arrays and a LAMBDA, then runs the LAMBDA on each value to produce a new array.

=MAP(array1, [array2, ...], lambda)
  • array1 – the first array of values to process
  • array2, … – additional arrays passed to the LAMBDA, one per parameter, [optional]
  • lambda – a LAMBDA that takes one parameter per array and returns the new value for each position

When to Use MAP Function

  • You want to apply a custom expression to every cell in a column without writing per-row formulas.
  • You need to run a calculation across two or more parallel columns at once.
  • You want a single spilling formula instead of an IF function or helper column repeated down the sheet.
  • You need a clean alternative to wrapping things in ARRAYFORMULA for non-trivial logic.

Example 1: Double Every Value in a List

Let’s start with the simplest case, multiplying every number in a column by two.

Below is the dataset, a list of five numbers in column A and an empty Doubled column.

Google Sheets dataset: "Number" column A (3,7,10,15,22) and empty "Doubled" column B.

You want each number doubled in column B.

Here is the formula:

=MAP(A2:A6, LAMBDA(x, x*2))
Formula for Example 1 in cell B2.

MAP walks down A2:A6 and hands each value to the LAMBDA as x. The LAMBDA multiplies it by 2 and the spill fills B2:B6. No fill-down needed.

Pro Tip: If your logic only depends on one cell at a time, MAP is the right tool. For row-aware logic across multiple columns, look at BYROW instead.

Example 2: Apply a Custom Expression to Each Value

MAP shines when the per-cell logic is more involved than a simple operation. Let’s compute x^2 + 1 for each value.

Below is the dataset, five numbers with an empty Squared + 1 column.

Google Sheets MAP function dataset: 'Number' column (2,4,5,8,10), 'Squared + 1' empty.

You want each number squared and then bumped up by one.

Here is the formula:

=MAP(A2:A6, LAMBDA(x, x^2 + 1))
Google Sheets: MAP function with LAMBDA(x, x^2 + 1) applied to A2:A6, spilling results.

The LAMBDA receives each value as x, computes the expression, and MAP stacks the results into a spilling column. You can swap in any expression here as long as it returns one value per call.

Example 3: MAP Across Two Parallel Arrays

MAP can take more than one array. The LAMBDA gets one parameter per array, and each call gets values from the same row position.

Below is the dataset, principals in column A and interest rates in column B.

Google Sheets dataset: Principal (A) and Rate (B) columns filled, Interest (C) column empty.

You want the simple interest (principal times rate) for each row in column C.

Here is the formula:

=MAP(A2:A6, B2:B6, LAMBDA(p, r, p*r))
Google Sheets: C2 formula MAP(A2:A6, B2:B6, LAMBDA(p,r,p*r)) calculates interest.

For each row, the LAMBDA gets the principal in p and the rate in r, then multiplies them. Both arrays must have the same shape; otherwise MAP throws an error.

Pro Tip: You can pass up to roughly a dozen arrays to MAP. They all need the same dimensions, and the LAMBDA needs one named parameter per array, in the same order.

Example 4: Proper-Case a List of Names

MAP isn’t limited to numbers. You can drop any single-value function inside the LAMBDA, including text functions like PROPER.

Below is the dataset, raw names with messy capitalization in column A.

Google Sheet: Column A lists raw, mixed-case names; Column B, 'Proper Name', is empty.

You want each name cleaned up so the first letter of each word is capital and the rest are lowercase.

Here is the formula:

=MAP(A2:A6, LAMBDA(n, PROPER(n)))
Google Sheets showing MAP, LAMBDA, PROPER formula in B2 converting raw names to proper names.

The LAMBDA wraps each name n in PROPER. MAP processes all 5 names in one go and the cleaned versions spill down column B. This pattern works for UPPER, LOWER, TRIM, or any single-argument text function.

Example 5: Pass or Fail Labels with IF Inside MAP

You can also nest IF inside the LAMBDA to tag each value based on a condition.

Below is the dataset, five test scores in column A.

Google Sheet showing 'Score' column A1:A6 and 'Result' header in B1.

You want each row labeled Pass when the score is 50 or above and Fail otherwise.

Here is the formula:

=MAP(A2:A6, LAMBDA(s, IF(s>=50, "Pass", "Fail")))
Google Sheet shows MAP and LAMBDA formula in B2, generating Pass/Fail results from scores.

For each score s, the LAMBDA checks the condition and hands back the right label. MAP collects all 5 labels into the spilling column. Useful when you don’t want a helper column or a long ARRAYFORMULA wrapper.

Tips & Common Mistakes

  • Array shapes must match. When passing multiple arrays, all of them need the same rows and columns or MAP errors out.
  • One value per LAMBDA call. The LAMBDA must return a single scalar; if it returns a range, MAP will not spill correctly.
  • Pick the right helper. Use MAP for per-cell work, BYROW for row-level aggregations, and SUM inside a LAMBDA when you need to total each row.

MAP keeps your sheet clean by replacing helper columns with one spilling formula. Once you get comfortable with LAMBDA, you’ll reach for it constantly.

List of All Google Sheets Functions

Related Google Sheets Functions / Articles: