ARRAYFORMULA Function
ARRAYFORMULA wraps a formula and applies it to every cell in a range at once, so you don't need to copy formulas down.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| array_formula | Any formula or expression that returns an array or range result. The formula is evaluated once for each row/column in the input ranges. | Required |
Basic Example
Multiply two columns row by row using a single formula
=ARRAYFORMULA(A2:A10 * B2:B10)Instead of writing =A2*B2 in C2 and copying down, ARRAYFORMULA calculates the product for every row in A2:A10 and B2:B10 in one cell.
Advanced Examples
Example 1: Conditional array with IF
Sales commissionCalculate 10% commission only for sales greater than $1,000
=ARRAYFORMULA(IF(A2:A100 > 1000, A2:A100 * 0.1, 0))Example 2: Combine with FILTER
Data extractionFilter and transform a dataset in one formula
=ARRAYFORMULA(FILTER(A2:C, B2:B > 50) * 1.1)How ARRAYFORMULA Works
ARRAYFORMULA evaluates the inner expression for each element of the input arrays and returns a spilled array. Any range references inside the formula are iterated element-by-element. It works especially well with IF, mathematical operators, and functions that normally return scalar values.
Important Notes & Limitations
ARRAYFORMULA is Google Sheets only; Excel uses dynamic arrays (e.g. =A2:A10*B2:B10 spills automatically).
Some functions like SUM, COUNT, or AVERAGE return a single value and do not spill inside ARRAYFORMULA.
If the output range overlaps existing data, the formula returns a #REF! error.
Common Errors & Fixes
#REF! errorThe spilled array is blocked by existing data in adjacent cells.Fix: Clear the cells below or to the right where the formula is trying to expand.
Single value instead of arrayA function inside the formula is aggregating the result (e.g., SUM, COUNT).Fix: Use row-by-row equivalents or remove the aggregator; SUM cannot be arrayed directly.
Mismatched range sizesInput ranges have different numbers of rows or columns.Fix: Ensure all referenced ranges have the same dimensions.
Download Practice File
ARRAYFORMULA
arrayformulaPractice ARRAYFORMULA with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the ARRAYFORMULA function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps