ARRAYFORMULA in Google Sheets
ARRAYFORMULA applies a formula to an entire range at once, so a single cell can calculate a whole column: =ARRAYFORMULA(B2:B*C2:C) multiplies price by quantity for every row, including rows added later. It is especially useful with Google Forms responses, where new rows arrive automatically.
Empty rows would show zeros, so pair it with IF: =ARRAYFORMULA(IF(B2:B="", "", B2:B*C2:C)). Press Ctrl+Shift+Enter while editing to wrap a formula in ARRAYFORMULA automatically.
Syntax
=ARRAYFORMULA(array_formula)
Example
=ARRAYFORMULA(IF(A2:A="", "", B2:B*C2:C))
Totals for every row with data, blank otherwise.
Common mistakes
- Typing values in cells the array needs to fill (#REF!).
- Using functions like SUM inside it and getting one total instead of per-row results.
- Forgetting the IF guard and filling the column with zeros.
← FILTER · IFERROR → · All lessons