ARRAYFORMULA Function in Google Sheets — Syntax, Examples, Patterns (2026)
Home› Google Sheets› Functions› ARRAYFORMULA
Google Sheets Function Reference

ARRAYFORMULA

Apply a formula to entire ranges instead of one cell at a time. One ARRAYFORMULA in a single cell replaces hundreds of dragged-down formulas — the foundation of maintainable Google Sheets workbooks.

⚡ Quick Answer

ARRAYFORMULA wraps a formula so it operates on entire ranges instead of single cells. The result spills across many cells from one anchor cell. It transforms non-array functions like IF, VLOOKUP, and arithmetic operators into array-aware versions.

Syntax

Function Signature
=ARRAYFORMULA(array_formula)

Arguments

ArgumentTypeDescription
array_formulaRequired Formula/Expression A formula that operates on ranges (like A2:A100*B2:B100) or a function call that would normally work on single cells (like IF(A2:A100>0, "Yes", "No")). Just one argument — the entire formula to be array-wrapped.

Keyboard shortcut

Instead of typing =ARRAYFORMULA( manually, use the shortcut. Type your formula normally with ranges (e.g., =A2:A26*B2:B26), then press:

Ctrl + Shift + Enter   (Mac: Cmd + Shift + Enter)

Sheets automatically wraps the formula in ARRAYFORMULA(...). Press the same combination again to toggle it off.

Basic usage

Multiply two columns row-by-row
=ARRAYFORMULA(A2:A100 * B2:B100)
99 multiplications happen in one formula. Results spill from the anchor cell downward.

When you need ARRAYFORMULA

Function typeNeeds ARRAYFORMULA?Reason
Arithmetic operators (+, -, *, /)✓ YesDon't natively broadcast across ranges
Comparison operators (>, <, =)✓ YesNeed wrapper to return array of TRUE/FALSE
IF, IFS, IFERROR, IFNA✓ YesReturn only first result without wrapper
Text functions (LOWER, LEFT, LEN)✓ YesDesigned for single cells
VLOOKUP, HLOOKUP, INDEX/MATCH✓ YesSingle-value returns without wrapper
Date functions (DATEDIF, MONTH)✓ YesDesigned for single cells
SUM, COUNT, AVG, MAX, MIN✗ NoAlready array-aware
FILTER, SORT, UNIQUE, QUERY✗ NoReturn arrays natively
SUMIF, COUNTIF△ OptionalNative for aggregating; wrap only for per-row aggregates

Common patterns

Concatenate two columns with a separator
=ARRAYFORMULA(B2:B100 & " " & C2:C100)
Build full names from First + Last columns
Nested IF for tier assignment
=ARRAYFORMULA(IF(A2:A100>=100, "Senior", IF(A2:A100>=50, "Mid", "Junior")))
Three-tier classification for every row in one formula
VLOOKUP for entire column
=ARRAYFORMULA(VLOOKUP(A2:A100, LookupTable!A:C, 3, FALSE))
99 lookups in one formula — replaces dragging VLOOKUP down 99 rows
Per-row group total with SUMIF
=ARRAYFORMULA(SUMIF(D:D, D2:D100, E:E))
Every row shows its group's total — useful for building "% of group" calculations
Calculate years of service
=ARRAYFORMULA(DATEDIF(H2:H100, TODAY(), "Y"))
Tenure in years for every employee, self-updating as time passes
Empty-safe calculation
=ARRAYFORMULA(IF(A2:A1000="", "", B2:B1000 * C2:C1000))
Prevents unwanted zeros in empty rows — professional-workbook essential
Add a header row with IF + ROW

To include a header on the output: =ARRAYFORMULA(IF(ROW(A2:A100)=2, "Header", IF(A2:A100="", "", B2:B100*C2:C100))). The nested IFs handle the header row, empty rows, and calculated rows separately.

Common errors

ErrorCause & fix
#REF! Spill area contains data. Clear the cells below your formula so it can spill freely.
#VALUE! Ranges have different sizes. A2:A10 * B2:B20 fails — match dimensions.
Only one value returned Passed single cells (A2) instead of ranges (A2:A100). Use ranges throughout.
Empty rows filled with zeros Arithmetic treats blanks as 0. Wrap with IF(A2:A100="", "", ...).
"Result was not automatically expanded" Not enough blank rows below. Add rows or shorten the range.

📚 Want the complete deep dive?

The full pillar guide covers all 6 patterns in depth, the header-row trick, Excel dynamic arrays comparison, performance tips, and includes a free companion workbook.

Read the Complete Guide

Related functions

Frequently asked questions

Does ARRAYFORMULA work in Microsoft Excel?

No. ARRAYFORMULA is native to Google Sheets. Excel 365 achieves similar results with dynamic arrays where formulas automatically spill without needing a wrapper — =A2:A100*B2:B100 works directly. Older Excel versions used Ctrl+Shift+Enter array formulas which are closer in concept.

What's the keyboard shortcut for ARRAYFORMULA?

Ctrl + Shift + Enter (or Cmd + Shift + Enter on Mac) automatically wraps your formula. Toggles on and off if pressed on an already-wrapped formula.

Which functions do NOT need ARRAYFORMULA?

Aggregations (SUM, COUNT, AVG, MAX, MIN) and array-native functions (FILTER, SORT, UNIQUE, QUERY) don't need it — they already handle ranges. Wrapping them usually has no effect. Wrapping is needed for arithmetic operators, IF, VLOOKUP, and functions designed for single cells.

Is ARRAYFORMULA slower than dragging?

For small ranges, no difference. For medium-to-large ranges, ARRAYFORMULA is often faster because Sheets processes the range in one calculation pass. The bigger benefit is maintainability — one formula instead of thousands.

Can ARRAYFORMULA output spill into multiple columns?

Yes. If the inner formula returns multiple columns (like VLOOKUP with column array {2,3,4}), ARRAYFORMULA spills across both rows and columns from a single anchor cell.