Google Sheets MAP Function: Syntax, Examples & Tips

The MAP function applies a specified function to each element in an array, returning a new array with the results.
Google Sheets
MAP(array1, [array2, ...], LAMBDA)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is a MAP Function?
  3. A Practical Example
  4. MAP Formula
  5. Result of the Formula
  6. Why Use MAP?
  7. Key Takeaways:
  8. Example use case

Parameters

array1:
The first array or range of cells that you want to map over.

array2:
(Optional) Additional arrays or ranges of cells that you want to map over alongside array1. You can include multiple arrays.

LAMBDA:
A function that defines the operation to be performed on each element of the arrays. This function can take parameters corresponding to the elements of the arrays and return a value for each mapping.

What is a MAP Function?

The MAP function in Google Sheets is a dynamic array function that allows you to apply a specified function to each element in an array or range, returning an array of results. This function is particularly useful for performing calculations or transformations on a set of data without the need for complex formulas or additional helper columns.

In simpler terms, MAP enables you to efficiently process and manipulate data in bulk, making it easier to analyze and visualize information.

A Practical Example

Imagine you have a list of sales data that includes the quantities sold and the price per unit for various products:

Sales Data Table:

ProductNameQuantityPricePerUnit
Widget A325.00
Widget B530.00
Widget C215.00

You want to calculate the total sales for each product by multiplying the quantity sold by the price per unit.

MAP Formula

To achieve this, you would use the MAP function as follows:

Google Sheets
=MAP(B2:B4, C2:C4, LAMBDA(q, p, q * p))

In this formula:

  • B2:B4 is the range containing the quantities sold.
  • C2:C4 is the range containing the price per unit.
  • LAMBDA(q, p, q * p) is a custom function that takes two arguments (quantity and price) and returns their product.

Result of the Formula

When you apply the MAP formula to the Sales Data Table, the output would look like this:

ProductNameQuantityPricePerUnitTotalSales
Widget A325.0075.00
Widget B530.00150.00
Widget C215.0030.00

The MAP function calculates the total sales for each product and displays the results in the new column.

Why Use MAP?

MAP is beneficial because it streamlines the process of applying functions to arrays, reducing the need for repetitive formulas and enhancing spreadsheet efficiency. It allows for easy data manipulation and can significantly simplify complex calculations.

Key Takeaways:

  • MAP: A dynamic array function that applies a specified function to each element in an array or range.
  • Efficiency: Simplifies calculations and transformations on data sets without needing additional helper columns.
  • Custom Functions: Supports the use of LAMBDA functions for tailored calculations.
  • Common Use Cases: Ideal for financial analysis, data transformation, and any scenario where bulk data processing is required.

MAP is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance data analysis and reporting capabilities.

Happy spreadsheeting!

Example use case

You have a table with sales data in Column A and corresponding commission rates in Column B. Use the MAP function to calculate total commissions for each sale by multiplying sales amounts with their respective rates, streamlining commission calculations.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.

MAP in Google Sheets - Better Analyst