How to Use IMPORTRANGE in Google Sheets

By Gerard Fernandez · Updated · 3 min read

IMPORTRANGE copies a range of cells from one Google Sheet into another, and keeps it up to date. It's how you build a dashboard that pulls numbers from several team sheets, or split a big file into linked parts without copying and pasting.

IMPORTRANGE syntax

=IMPORTRANGE(spreadsheet_url, range_string)
  • spreadsheet_url – the full URL of the source file, in quotes. You can also use just its long ID.
  • range_string – the sheet and range to import, in quotes, like "Sheet1!A1:C10".

A working example:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/ABC123.../edit", "Expenses!A1:C20")

Grant access the first time

The first time you link two files, the cell shows #REF! with the message "You need to connect these spreadsheets" (older versions said "these sheets"). Hover over it and click Allow access.

IMPORTRANGE cell showing #REF! with the message You need to connect these spreadsheets, a Learn more link and an Allow access button
Real test: what we saw the first time we linked two of our test files.
After allowing access, IMPORTRANGE in A1 shows Month and Sales for Jan, Feb and Mar, and a SUM of IMPORTRANGE in D2 shows 3580
Real test: after Allow access, A1 shows the imported table and =SUM(IMPORTRANGE(…)) in D2 adds the imported sales.

This is a one-time step per pair of files (in our test, one click also fixed the SUM in D2 that read the same file), and only someone with edit access to the destination can do it. No button? See how to fix "You need to connect these sheets".

Import a whole column that keeps growing

Leave the end row off so new data is included automatically:

=IMPORTRANGE("...url...", "Expenses!A:C")

Use the imported data in formulas

Wrap IMPORTRANGE in another function to summarize as you import. For example, total an imported amount column:

=SUM(IMPORTRANGE("...url...", "Expenses!C2:C"))

Or filter it: =FILTER(IMPORTRANGE("...url...","Expenses!A2:C"), IMPORTRANGE("...url...","Expenses!A2:A")="Food").

Fix common errors

You see…Fix
#REF! "You need to connect"Hover the cell and click Allow access. No button?
#REF! "not found"Check the sheet name and range spelling in the range string.
#ERROR!Usually a quoting mistake. Both arguments must be in double quotes. See Formula parse error.
Loading… foreverThe source is large or was just edited. Wait, then retype the formula. Importing huge ranges is slow; import only the columns you need.

Tip: put the source URL in its own cell (say A1) and reference it: =IMPORTRANGE($A$1, "Expenses!A:C"). Then you only update the link in one place.

Importing from a web page instead? IMPORTXML and IMPORTHTML have their own errors, like "Could not fetch url". See how to fix IMPORTXML errors.

Frequently asked questions

Does IMPORTRANGE update automatically?

Yes, within about an hour, and sooner when you open or edit the file. It's a live link, not a one-time copy.

Can I edit the imported data?

No. The imported cells are read-only results. Change the data in the source sheet instead.

Is my data safe?

Allowing access lets the destination file read the source. Only connect files you trust, and remember anyone who can edit the destination can see the imported values.