<< Go back to all functions

MAP

The MAP function in Google Sheets allows you to map each value in a given array to a new value by applying a LAMBDA function to each value.

Function Syntax and Parameters

Syntax: MAP(array1, [array2, ...], LAMBDA)

Parameters:

  • array1: The first array to be mapped.
  • array2, ...: [Optional] Additional arrays to be mapped.
  • LAMBDA: The function applied to each value in the arrays.

Step-by-Step Tutorial

  1. Using MAP with a single array:

    • Example: =MAP(A1:A5, LAMBDA(x, x^2))
    • Result: [1, 4, 9, 16, 25]
  2. Using MAP with multiple arrays:

    • Example: =MAP(A1:A5, B1:B5, LAMBDA(x, y, x+y))
    • Result: [3, 7, 11, 15, 19]

Use Cases and Scenarios

  1. Data Transformation: Apply a specific formula to each value in an array.
  2. Array Combination: Combine two or more arrays by applying a specific operation to their corresponding values.

Related Functions

  • FILTER: Filter values from an array based on a condition.
  • SORT: Sort values in an array or range.
  • REDUCE: Reduce an array or range to a single value using a LAMBDA function.

Related Articles