Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

ARRAYFORMULA in Google Sheets: Fill a Whole Column with One Formula

ARRAYFORMULA in Google Sheets: fill a whole column with one formula
Illustration: ARRAYFORMULA in Google Sheets

The ARRAYFORMULA function in Google Sheets lets one formula fill a whole column, so you do not have to copy it down row by row. New rows are included automatically, which makes it handy for totals, joined text and lookups. This guide shows how to use ARRAYFORMULA with made-up data, how to keep blank rows tidy and how to fix the usual errors.

What ARRAYFORMULA does

A normal formula works on one row. ARRAYFORMULA tells Sheets to apply the formula to a whole range and return many results at once. You type it in the first result cell, and the answers spill down into the cells below.

ARRAYFORMULA in Google Sheets for a line total: quantity times price
One formula fills the column (illustration, made-up data).

A simple ARRAYFORMULA example

Say column B holds quantities and column C holds prices, with headings in row 1. To get the line total for every row in column D:

=ARRAYFORMULA(B2:B*C2:C)

Type it in D2. The results appear down column D. The cells below D2 must be empty, or Sheets shows an error.

Add a heading in the same formula

You can place the column heading and the results in one formula:

=ARRAYFORMULA({"Line total"; B2:B*C2:C})

Type it in D1. The curly brackets build one list with the heading on top, and the semicolon stacks the items vertically.

ARRAYFORMULA with IF to skip empty rows in Google Sheets
Keep blank rows empty (illustration).

Skip blank rows with IF

An open range such as B2:B also covers empty cells below your data, so you may see zeros. Wrap the formula in IF and test for blanks:

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

Rows with no quantity now show nothing.

ARRAYFORMULA to join first name and last name in Google Sheets
Join text for every row (illustration).

Join text across a column

=ARRAYFORMULA(A2:A&" "&B2:B)

This joins first names in column A with last names in column B for every row.

ARRAYFORMULA with VLOOKUP

Giving VLOOKUP a whole range of lookup values inside ARRAYFORMULA may not return a result for every row. Test it on a few rows before you trust it. Often a normal VLOOKUP filled down, or a QUERY, is the safer choice. Read our guide to XLOOKUP vs VLOOKUP to pick the right lookup.

ARRAYFORMULA not expanded error and other fixes in Google Sheets
Common errors and fixes (illustration).

Fix common ARRAYFORMULA errors

  • Array result was not expanded because it would overwrite data. Clear the cells below the formula.
  • Zeros in empty rows. Wrap the formula in IF(range="", "", ...).
  • Ranges of different sizes. Use ranges with the same number of rows.
  • Formula typed in many rows. Keep it in one cell only, in the top row.

ARRAYFORMULA in Google Sheets: common questions

Does ARRAYFORMULA work in Excel?

Newer versions of Excel can spill results from a normal formula without it. Check your version's help page.

Can I edit one cell of the result?

No. The results belong to the single formula in the first cell. Edit that formula instead.

Does it slow down my sheet?

Very large open ranges can make a sheet slower. Use a fixed range if you notice this.

Related guides on Sheets AI Hub

See the QUERY function, multiple IF statements and how to make a dashboard.

العربية