SheetsLessons
Lesson 35 · Arrays & Filtering

ARRAYFORMULA

Practice ARRAYFORMULA in Google Sheets: calculate a whole column with one formula, run IF over a range, join columns, and total row-by-row products without a helper column.

Task 1 of 4

Work out the total (price × qty) for every row with one formula in D2.

D2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

One formula for the whole column

Normally you write a formula in the first row and drag it down. ARRAYFORMULA lets one formula work on whole ranges at once: =ARRAYFORMULA(B2:B8*C2:C8) multiplies each row's B by its C and spills every answer down the column.

=ARRAYFORMULA(array_formula)

Without it, Sheets expects single cells in places like B2:B8*C2:C8, so the formula won't calculate across the whole range. While editing a formula, press Ctrl+Shift+Enter (⌘+Shift+Enter on a Mac) and Sheets wraps it in ARRAYFORMULA for you.

Why people use it

  • Rows added by a form: one formula in the header row area covers new rows automatically, where dragged formulas would stop.
  • Fewer formulas to maintain: one formula to fix instead of hundreds of copies.
  • No helper columns: =SUM(ARRAYFORMULA(B2:B8*C2:C8)) totals price × quantity in a single cell.

Most functions work element by element inside ARRAYFORMULA: IF, LEFT, UPPER, ROUND, VLOOKUP's search key and so on. Functions that already combine a range into one answer (SUM, AND, COUNTIF) still return one value.