Sheetsdrill

Sheets-only Updated November 2026

IMPORTRANGE

IMPORTRANGE(spreadsheet_url, range_string) copies a range from another Google Sheets file into the current one and keeps it in sync. The first time you use it for a source file you click Allow access on the cell; after that anyone with access to the destination sees the data.

Syntax

=IMPORTRANGE("spreadsheet_url", "Sheet1!A1:C20")
PartWhat it is
spreadsheet_urlThe full URL of the source spreadsheet, or just its key (the long ID in the URL), in double quotes or as a cell reference.
range_stringThe sheet name and range to import, for example "Sales!A1:D" or "A1:D100" (first sheet when no name is given).

Examples

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1aBcD.../edit", "Orders!A1:E")

Result: The Orders sheet columns A to E, live, starting in the formula cell

Click Allow access on the #REF! cell the first time.

=IMPORTRANGE(A1, "Sheet1!A:C")

Result: Same import with the URL stored in cell A1

Keeping the URL in a cell makes it easy to switch source files.

=QUERY(IMPORTRANGE(A1, "Data!A:D"), "select Col1, Col4 where Col2 = 'Paid'", 1)

Result: Only the paid rows, columns 1 and 4

Inside QUERY an imported range uses Col1, Col2 instead of letters.

Common mistakes

  • #REF! You don't have permissions to access that sheet means the access prompt was never accepted; hover the cell and click Allow access, or the source owner has not shared the file with you.
  • #REF! Result was not expanded means the imported data would overwrite filled cells; clear the area below and to the right.
  • A #N/A or empty result with a correct URL often comes from a wrong sheet name; the name must match exactly, including spaces, and needs quotes only in the range string, not around the sheet name.

Practice it

The drills on Sheetsdrill check your answer on live data, free, no account needed.

Start practicing

Questions

How often does IMPORTRANGE refresh?

Roughly every 30 minutes, and sooner when the destination file is open and the source changes. It is not instant.

Can I import from a sheet I do not own?

Yes, as long as the owner has shared the source file with your account (view access is enough). Other viewers of the destination see the data without needing access to the source.

Related

  • QUERYHow the Google Sheets QUERY function works: the SQL-like syntax, select and where, group by with sum and count, order by, limit, and the errors people hit.
  • FILTERHow the FILTER function in Google Sheets returns only rows that match one or more conditions, with examples for AND, OR, dates and text, plus common errors.
  • VLOOKUPHow VLOOKUP works in Google Sheets: the four arguments, exact and approximate match, lookups from another sheet, and fixes for #N/A and wrong results.
  • ARRAYFORMULAHow ARRAYFORMULA in Google Sheets fills a whole column from one cell, with examples for multiplying columns, IF across a range, and the common errors.

Previous: ARRAYFORMULANext: FILTER