What is ARRAYFORMULA in Google Sheets?

ARRAYFORMULA tells Google Sheets to treat a formula as an array operation so one expression fills many cells at once. It is common with IF, VLOOKUP, and math on full columns before dynamic arrays made many patterns automatic. It still matters for legacy sheets and explicit control.

When to use it

Use ARRAYFORMULA when you need one formula copied down thousands of rows without drag-fill, or when combining with functions that do not auto-spill in older workbooks.

When to skip it

Skip ARRAYFORMULA when a native dynamic array function like FILTER, MAP, or BYROW already spills correctly. New sheets often need only the inner formula.

How it works

  1. 1

    Write the logic once for a single row, using relative references where the row number should change down the column.

  2. 2

    Wrap the expression in ARRAYFORMULA(...) so Google Sheets evaluates it across the whole target range.

  3. 3

    Place the formula in the top cell of the output column and leave room for the spill.

  4. 4

    Pair with IF or LEN to blank rows where source cells are empty so you do not show zeros on blank lines.

  5. 5

    Avoid volatile references inside huge ARRAYFORMULA columns because every recalc hits the full range.

  6. 6

    Test on a small slice before pointing at entire columns on 50k-row tabs.

Examples in Google Sheets

Column-wide IF

=ARRAYFORMULA(IF(LEN(A2:A)=0, "", A2:A*1.1)) applies a 10% markup down column B only where column A has data.

Lookup every row

=ARRAYFORMULA(IF(LEN(C2:C)=0, "", VLOOKUP(C2:C, Prices!A:B, 2, FALSE))) fills prices for a SKU list without copying.

Running flag

=ARRAYFORMULA(IF(ROW(A2:A)=ROW(A2), "Start", IF(A2:A>A1:A, "Up", "Down"))) compares each row to the row above across the column.

Build this without starting from a blank cell

Use a Better Sheets tool for ARRAYFORMULA, then watch a walkthrough when you want the full pattern.

Better Sheets resources

Common mistakes

  • Nesting ARRAYFORMULA twice, which often returns unexpected single-cell results or errors.
  • Placing ARRAYFORMULA over cells that already contain values, blocking the spill.
  • Using entire column references A:A inside heavy lookups on very large sheets, slowing every edit.
  • Expecting ARRAYFORMULA to fix a #REF! from a bad range size in the inner function.
  • Forgetting to wrap only the part that must expand, making debugging harder than needed.

Frequently asked questions

Is ARRAYFORMULA still needed?
Many newer functions spill automatically. ARRAYFORMULA remains useful for older patterns and explicit control over legacy formulas.
Why do I see one result only?
The inner function may not return an array, or another ARRAYFORMULA conflict sits in the spill path.
ARRAYFORMULA vs drag-fill?
ARRAYFORMULA keeps one formula to maintain. Drag-fill creates thousands of separate formulas that are harder to update.
Can ARRAYFORMULA work across sheets?
Yes. Reference another tab inside the wrapped expression the same way as a normal formula.
Does ARRAYFORMULA work with QUERY?
Rarely together. QUERY already returns a table. Use one or the other for the output block.
How do I stop at the last row?
Wrap with IF(LEN(source)=0, "", ...) or use FILTER and dynamic arrays instead of filling blanks manually.
ARRAYFORMULA and blank cells?
Math on blanks may become zero. Test with LEN or ISBLANK guards in the wrapped formula.

Related Tutorials

Watch how ARRAYFORMULA works

Browse more tutorials
Replace 1,000 Formulas Instantly

Replace 1,000 Formulas Instantly

Learn a cool trick you can do with the ArrayFormula. If you don't know w...
Spreadsheet Automation 101 Lesson 2: Arrays

Spreadsheet Automation 101 Lesson 2: Arrays

Learn the basics of Arrays – how to create one, how to reference rows an...
Don't Delete My Formulas

Don't Delete My Formulas

How to prevent someone from deleting your formulas. Beyond protecting yo...
Member Asks: How do I calculate from a set of Form entries?

Member Asks: How do I calculate from a set of Form entries?

Use arrayformula to deal with Google form entries on a sheet. Even as th...
Your First Formula

Your First Formula

Learn how to use Formulas in Google Sheets. Use the Equal sign "=" to un...
How to Iterate Counting Blank Cells in Google Sheets

How to Iterate Counting Blank Cells in Google Sheets

Count different types of blank cells. Cells with nothing in them.

Related blog posts

Guides that explain ARRAYFORMULA in more depth.

Browse the blog

Related glossary terms

Done reading about ARRAYFORMULA?

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.