Clean phone text
=MAP(A2:A, LAMBDA(v, REGEXREPLACE(v, "[^0-9]", ""))) strips non-digits per cell.
MAP walks aligned arrays element by element and applies a LAMBDA to each position. Pass one array for unary transforms or several arrays for element-wise combinations. It is the modern replacement for many ARRAYFORMULA column operations.
Use MAP to clean a column, combine two aligned lists, or apply conditional logic per cell with readable LAMBDA bodies.
Skip MAP when whole-row or whole-column context is required. Use BYROW or BYCOL instead.
Pass the source array as the first MAP argument.
Add LAMBDA(param, expression) as the last argument.
For two lists, MAP(A2:A, B2:B, LAMBDA(a, b, a+b)) combines pairs.
Arrays must be the same size or MAP returns errors.
Nest LET inside LAMBDA for multi-step per-cell math.
Compare results to your old drag-fill on ten rows before rolling out.
=MAP(A2:A, LAMBDA(v, REGEXREPLACE(v, "[^0-9]", ""))) strips non-digits per cell.
=MAP(A2:A, B2:B, LAMBDA(x, y, x+y)) sums pairs without dragging.
=MAP(C2:C, LAMBDA(n, IF(n>=90, "A", IF(n>=80, "B", "C")))) assigns letter grades.
Build this without starting from a blank cell
Use a Better Sheets tool for MAP, then watch a walkthrough when you want the full pattern.
Watch how MAP works
Guides that explain MAP in more depth.
LAMBDA defines an anonymous function inside a formula. You name parameters, write the calculation, then pass arguments when you call it. Combined with MAP, BYROW, or a named LAMBDA in the Name manager, it replaces fragile copy-paste logic across big tables.
Read guide →BYROW takes an array and a LAMBDA that receives one row at a time. It returns a column of results, one per row. It is the clean way to sum across columns, test row-wide rules, or format composite keys without ARRAYFORMULA hacks.
Read guide →REDUCE walks an array left to right, carrying an accumulator value updated by a LAMBDA on each step. It can implement custom aggregates, text joins with rules, or conditional running logic that SUM alone cannot express.
Read guide →SCAN is like REDUCE but returns every intermediate accumulator in a spilled column. It powers running totals, cumulative text builds, and step-by-step counters without dragging cumulative formulas.
Read guide →Done reading about MAP?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.