MAP function in Google Sheets
Maps each value in the given arrays to a new value by application of a LAMBDA function to each value.
=MAP(array1, [array2, ...], LAMBDA)MAP syntax and parameters
Three arguments, two required.
- array1arrayRequired
An array or range to be mapped.
- array2arrayRepeating
[OPTIONAL] Additional arrays or ranges to be mapped.
- LAMBDAanyRequired
A LAMBDA function that’s mapped to each value in the given arrays to obtain a new mapped value. Syntax: LAMBDA(name1, [name2, …], formula_expression) Requirements: The LAMBDA must have exactly 1 name argument for each array passed, along with a formula_expression which uses those names. When LAMBDA is applied, the names resolve to the current values being mapped in the passed arrays.
MAP examples
Formulas you'll actually reuse.
Gross amounts from a net column, without a helper column:
=MAP(D2:D200, LAMBDA(amount, ROUND(amount * 1.19, 2)))Two arrays at once — quantity times unit price per row:
=MAP(C2:C200, D2:D200, LAMBDA(qty, price, qty * price))
MAP in Excel
Same name — your formula ports as-is.
Try MAP in the playground
Edit the example — nothing to install.
Preloaded with the MAP formula from Example 1 — change anything and watch it respond.
Related functions
More ways Google Sheets gets this done.
- BYCOLGroups an array by columns by application of a LAMBDA function to each column.ArrayExcel
- BYROWGroups an array by rows by application of a LAMBDA function to each row.ArrayExcel
- CHOOSECOLSCreates a new array from the selected columns in the existing range.ArrayExcel
- CHOOSEROWSCreates a new array from the selected rows in the existing range.ArrayExcel
- HSTACKAppends ranges horizontally and in sequence to return a larger array.ArrayExcel
- LINESTGiven partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.ArrayExcel