Logical

MAP Function in Excel

Returns an array formed by mapping each value in the array(s) to a new value using a LAMBDA.

Syntax

  • =MAP(array1, lambda_or_array2, ...)

Arguments

  • array1 (required): First array
  • lambda (required): LAMBDA function to apply

Examples

  • =MAP(A1:A5, LAMBDA(x, x*2)) - Double each value - Result: Doubled array

Excel MAP function documentation

  • MAP applies a [LAMBDA](/functions/lambda/) to each element of an array and returns the transformed array.
  • Syntax: =MAP(array, lambda_or_array, [lambda2], ...). Microsoft 365 dynamic array function.
  • Use to clean columns, compute row-wise logic without filling helper columns, and modernize array formulas.
  • Related: [BYROW](/functions/byrow/), [BYCOL](/functions/bycol/), [MAKEARRAY](/functions/makearray/), [LET](/functions/let/).

MAP syntax and LAMBDA pairing

  • array: vector or matrix to transform.
  • lambda: =MAP(A2:A100, LAMBDA(x, x*1.1)) for 10% uplift example.
  • Multiple arrays: LAMBDA can accept parallel arrays of same size.
  • Requires understanding LAMBDA parameter names — start with simple one-arg lambdas.

Step-by-step: trim and upper a text column

  • Step 1 — Raw text in A2:A500.
  • Step 2 — =MAP(A2:A500, LAMBDA(t, UPPER(TRIM(t)))).
  • Step 3 — Spills cleaned list — ensure empty column for spill.
  • Step 4 — Compare with manual helper column for audit on 3 rows.
  • Step 5 — Read [LET function guide](/blog/excel-let-function-cleaner-formulas-guide/) before complex MAP.

MAP vs BYROW vs filling down

  • MAP — element-wise on one array.
  • BYROW — custom function per row of a 2D range.
  • Fill down — static after copy; MAP stays live.
  • Performance: MAP on full columns can be heavy — use bounded tables.

Worked examples to copy

  • Double values: =MAP(A2:A10, LAMBDA(v, v*2)).
  • IF per cell: =MAP(scores, LAMBDA(s, IF(s>=60,"Pass","Fail"))).
  • Nested: =MAP(A2:A10, LAMBDA(x, TEXT(x,"0.00"))).
  • With LET: =LET(r, A2:A100, MAP(r, LAMBDA(v, v+tax_rate))).

People also ask

  • MAP in Excel 2019? — No; 365 with LAMBDA support.
  • MAP #CALC!? — Lambda arity mismatch with provided arrays.
  • MAP vs array formula? — MAP is clearer and spills natively.
  • Learn MAP before LAMBDA? — Learn LET first, then LAMBDA, then MAP.

Common errors

  • Requires Excel 365
  • LAMBDA must match array dimensions

Use cases

  • Transform arrays
  • Apply functions
  • Batch calculations

Frequently asked questions

  • How do I apply a custom calculation to every cell in a range? Use =MAP(range, LAMBDA(x, your_formula)). Example: =MAP(A1:A100, LAMBDA(x, IF(x>0, x*1.1, x))) adds 10% to positive values only. The LAMBDA processes each cell individually.
  • Can MAP work with multiple arrays? Yes! =MAP(array1, array2, LAMBDA(a, b, a+b)) adds corresponding elements. The arrays must be the same size. Example: =MAP(Prices, Quantities, LAMBDA(p, q, p*q)) calculates line totals.
  • What is the difference between MAP and BYROW/BYCOL? MAP processes each individual cell. BYROW processes entire rows at once, BYCOL processes entire columns. Use MAP for cell-by-cell operations, BYROW/BYCOL when you need to aggregate across a row or column.

Editorial review

  • Reviewed by Excel.Directory Editorial Team. Updated May 2026.

When to use MAP

  • Transform arrays — common Logical scenario for MAP.
  • Apply functions — common Logical scenario for MAP.
  • Batch calculations — common Logical scenario for MAP.

MAP in the Logical category

  • Browse all Logical functions at /categories/logical/ for related formulas.
  • MAP syntax: =MAP(array1, lambda_or_array2, ...)
  • array1 (required): First array
  • lambda (required): LAMBDA function to apply
  • Confirm MAP arguments match the syntax shown above before filling down.
  • Lock table and range references with $ when copying formulas across rows or sheets.

Formula checklist before you copy down

  • Confirm MAP arguments match the syntax shown above before filling down.
  • Lock table and range references with $ when copying formulas across rows or sheets.
  • If results look wrong, check for text stored as numbers and invisible spaces with TRIM.
  • Spot-check three known input rows manually against expected output.

Related Excel functions

  • LAMBDA (/functions/lambda/): Creates custom, reusable functions that can be called by a friendly name.
  • REDUCE (/functions/reduce/): Reduces an array to an accumulated value by applying a LAMBDA to each value.
  • SCAN (/functions/scan/): Scans an array by applying a LAMBDA to each value and returns an array of intermediate values.
  • BYROW (/functions/byrow/): Applies a LAMBDA to each row and returns an array of results.

Errors to watch for

  • Requires Excel 365 — review causes on linked error pages in the directory.
  • LAMBDA must match array dimensions — review causes on linked error pages in the directory.

Copy-paste audit workflow

  • Enter MAP on three test rows with known expected output documented on a QA tab.
  • Fill down only after absolute references are locked on lookup tables and rate tables.
  • Compare against manual calculation or a calculator for financial and statistical functions.
  • Search this directory for comparison guides when choosing between similar functions in the same category.

MAP worked examples to copy

  • =MAP(A1:A5, LAMBDA(x, x*2)) — Double each value. Expected result: Doubled array.

MAP reference summary for crawlers and offline review

  • MAP belongs to the Logical category in Excel. Returns an array formed by mapping each value in the array(s) to a new value using a LAMBDA.
  • Full syntax: =MAP(array1, lambda_or_array2, ...). Open /functions/map/ for parameters, FAQs, and related pages.
  • Common mistakes: Requires Excel 365; LAMBDA must match array dimensions
  • Pair this function with comparison guides when another Excel formula might fit the same task better.
  • Review fix-excel-formula-errors when unexpected errors appear after upgrading Excel or sharing across locales.