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.
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
=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:
=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:
=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:
=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:
={"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
Clean text without deleting meaningful spaces
To normalize ordinary leading, trailing, and repeated spaces in a helper column:
=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
| Problem | Why it happens | Fix |
|---|---|---|
| Formula returns too many blank rows | Full-column range has no blank check | Wrap the logic in IF(A2:A="","",...) |
#REF! spill error | Output cells already contain values | Clear the cells below the formula |
| Mixed row counts | Source ranges have different sizes | Use ranges with matching start and end rows |
| Formula is hard to debug | Too much logic is packed into one expression | Build 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:
=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.
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 Tracker
Track tasks, owners, priorities, due dates, and blockers in one delivery board. Group work by stream, review progress, and keep next steps visible.
Open templateMarketingContent Calendar
Plan topics, channels, owners, publish dates, and content status in one editorial board. Track weekly campaigns and keep your publishing mix visible.
Open templateFinanceExpense Tracker
Log every expense, track receipts, and generate category summaries. Free template for personal or business use.
Open templateFinanceInvoice Template
Professional invoice template with automatic subtotal, tax, and total calculations. Customise with your logo and send in minutes.
Open template