Calc MAP function

The MAP function applies a function to each item in a collection and returns a new collection with the results.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.


Description

The MAP function is used to apply a specified function to each item in a collection, returning a new collection with the results. This is useful for transforming data in a collection without modifying the original collection.


Syntax

MAP(collection, function)


The MAP function syntax has the following arguments:

  • collection - Required. The collection of items to which the function will be applied.
  • function - Required. The function to apply to each item in the collection.

Example

FormulaDescriptionResult
=MAP({1, 2, 3}, x -> x * 2)Applies the function that doubles each number in the collection{2, 4, 6}
=MAP({"a", "b", "c"}, x -> UPPER(x))Converts each character in the collection to uppercase{"A", "B", "C"}

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.