Skip to content
Blog/Google Sheets
Google Sheets

How to Use ARRAYFORMULA in Google Sheets

Use ARRAYFORMULA to fill a Google Sheets column from one formula, skip blank rows, add a header, and troubleshoot blocked array results.

Do this with AI

Try Griddy free

Start in your browser. Also works with Excel and Google Sheets.

By Justin Freels//7 min read

ARRAYFORMULA in Google Sheets lets one formula return results for many rows or columns at once. It is useful when a calculated field should keep working as new rows are added to a tracker, budget, CRM, or calendar.

Use it when the logic is the same for every row. If each row needs a different exception, a normal formula copied down may be easier to audit.

The syntax

fx
=ARRAYFORMULA(array_formula)
  • array_formula - the expression you want Sheets to calculate across a range

The most common pattern is wrapping a row-level formula so it fills a whole column.

Google notes that many modern array-returning functions already expand automatically, so FILTER, UNIQUE, and similar formulas often do not need an extra ARRAYFORMULA wrapper.

Basic example

Say quantity is in B2:B, price is in C2:C, and total should appear in column D. Instead of copying a formula down every row, use:

fx
=ARRAYFORMULA(B2:B*C2:C)

That returns a total for every row where the source values exist.

In a real operating sheet, you usually want blank source rows to stay blank:

fx
=ARRAYFORMULA(IF(A2:A="","",B2:B*C2:C))

This works well in an expense tracker or invoice template where the calculated amount should appear only when a row has been started.

Add a status label across a column

ARRAYFORMULA is also useful for review labels. If due dates are in E2:E, this formula marks overdue rows:

fx
=ARRAYFORMULA(IF(E2:E="","",IF(E2:E<TODAY(),"Overdue","OK")))

That pattern fits a project tracker, content calendar, or CRM follow-up sheet because the review label updates as dates change.

Include the header in the formula

If you want one formula in the header row to create both the label and the calculated values, use an array literal:

fx
={"Status";ARRAYFORMULA(IF(E2:E="","",IF(E2:E<TODAY(),"Overdue","OK")))}

The first value creates the header. The semicolon stacks the calculated column underneath it.

TIP

Put ARRAYFORMULA in one cell at the top of the output range. Do not also type values into the cells it needs to fill.

Clean text without deleting meaningful spaces

To normalize ordinary leading, trailing, and repeated spaces in a helper column:

fx
=ARRAYFORMULA(IF(A2:A="","",TRIM(A2:A)))

This keeps one space between words. Avoid a global replacement that removes every space from names, addresses, or labels.

Common ARRAYFORMULA mistakes

ProblemWhy it happensFix
Formula returns too many blank rowsFull-column range has no blank checkWrap the logic in IF(A2:A="","",...)
#REF! spill errorOutput cells already contain valuesClear the cells below the formula
Mixed row countsSource ranges have different sizesUse ranges with matching start and end rows
Formula is hard to debugToo much logic is packed into one expressionBuild the row formula first, then wrap it

Inspect the intended spill area before clearing anything. A blocking cell may contain a manual input or another formula that needs to move rather than be deleted.

Performance and compatibility

Whole-column references are convenient but make a large sheet evaluate many unused rows. Use a realistic boundary when the data has a practical maximum:

fx
=ARRAYFORMULA(IF(A2:A5000="","",B2:B5000*C2:C5000))

Google's performance guidance recommends simplifying large array calculations and sometimes moving complex array logic into helper columns. Google also notes that array formulas cannot be exported in every context, so verify important behavior after moving the workbook to another format.

When not to use ARRAYFORMULA

Avoid ARRAYFORMULA when every row has custom logic, manual overrides, or formulas that are easier for the team to inspect one row at a time. A sheet should be easier to maintain after using ARRAYFORMULA, not just shorter.

Do this with AI

ARRAYFORMULA saves copy-down work, but it is easy to break the output range or forget blank-row handling.

"Turn these copied formulas into one ARRAYFORMULA column, keep blank rows blank, and make sure the overdue status still works"

Griddy can convert the repeated formula, test the row logic, and place the array formula where it will not collide with existing data.

Related guides: FILTER in Google Sheets and Google Sheets date formulas.

Sources

Do this with AI

Turn the instructions into a finished spreadsheet.

Tell Griddy what you need in plain English, then inspect and keep editing the result in the browser, Excel, or Google Sheets.

Try Griddy freeStart in your browser. No download required.
Also works withExcel Google Sheets

Use this on real templates

Keep calculated fields working as rows grow

ARRAYFORMULA is useful when templates need status labels, totals, or review fields that keep filling automatically as new rows are added.

Project Management