How to use array formulas in Google Sheets
In Google Sheets (verified 2026-10-24), enter an array formula that returns many values at once — for example =ARRAYFORMULA(A2:A*B2:B), =FILTER(A2:C, C2:C="West"), or =UNIQUE(A2:A). Modern dynamic functions often spill automatically; wrap older functions with ARRAYFORMULA when you need element-wise math down a column. Leave spill destination cells empty so results can expand.
This guide goes beyond a single ARRAYFORMULA intro — it covers choosing FILTER/UNIQUE/SORT vs wrapping, and repairing #REF! expand errors. Excel dynamic arrays are similar in spirit but use different function names in places.
Applies to Google Sheets on the web. Mobile can display spills; authoring long formulas is easier on desktop. Locale settings may use ; instead of , as the argument separator.
Spill one formula across many rows
Start with a dynamic array function
- Pick a clear output column with empty cells below.
- Try
=UNIQUE(A2:A)or=FILTER(A2:B, B2:B>=100). - Confirm results spill downward automatically.
Use ARRAYFORMULA for element-wise math
- Where a normal formula only fills one row, wrap it:
=ARRAYFORMULA(IF(A2:A="",,A2:A*B2:B)). - Prefer open ranges (A2:A) carefully so you do not overrun the sheet.
- Add an IF blank-guard so empty source rows stay blank.
Fix expand errors
- If you see #REF! about not expanding, clear values blocking the spill range.
- Avoid putting another formula in cells the array needs to fill.
- Prefer FILTER over copying thousands of dragged rows.
Our take: one formula beats a thousand drags
When teammates insert rows, an array formula still fills — dragged copies often do not.
If it fails
- #REF! expand: destination cells are not empty — clear them.
- #N/A from FILTER: no rows matched — wrap with IFERROR or check criteria.
- Slow sheet: huge open-ended ARRAYFORMULA on entire columns — narrow ranges.
- Comma errors: your locale needs semicolons between arguments.
Frequently asked questions
What is an array formula in Sheets?
A formula that outputs multiple values (a spill) from one cell, via ARRAYFORMULA or functions like FILTER and UNIQUE.
When do I need ARRAYFORMULA?
When you want an older non-array function to run across a range element-wise (for example A2:A*B2:B in one go).
ARRAYFORMULA vs FILTER?
FILTER already returns arrays; ARRAYFORMULA is the wrapper for functions that would otherwise stay single-cell.
Why #REF! on my array?
Sheets cannot expand into occupied cells — clear the spill range or move blockers.
Do array formulas work offline?
Cached values may show; recalculation needs Sheets connectivity for most cases.