
Copying numbers from one spreadsheet to another works for a week. Then the source changes and the copy is wrong. IMPORTRANGE keeps a live link instead: one formula pulls a range from another file and refreshes it as the source changes.
The syntax
IMPORTRANGE(spreadsheet_url, range_string)
- spreadsheet_url is the full address of the file you are reading from, in quotation marks or a cell that holds it.
- range_string is the range, written as
"Sheet1!A2:B6"or just"A2:B6". Leave the sheet name out and it reads the first sheet.
That definition and every rule below come from Google's page IMPORTRANGE.
Your first formula
- Open the spreadsheet that should receive the data.
- Click the cell where the import should start.
- Type the formula with the source URL and the range.
- Wait a few seconds. A #REF! error appears with the message "You need to connect these sheets. Allow Access."
- Click Allow Access.
That prompt is normal, not a mistake. Google requires the destination file to be granted permission before it can read another file, and the grant is remembered after the first time.
If you do not own the source file
The prompt changes: you are told you do not have permission to access that sheet. The fix is to open the source URL in the browser, request access, and wait for the owner to grant it. After that, any editor of the destination sheet can pull from any part of the source, and the access lasts until the person who granted it is removed from the source file. Google also notes this grant counts against the 600-user share limit on the source.
Do the maths in the source, not the destination
This is the single biggest performance tip on the page. If you need the total of a million rows, calculate the total in the source file and import that one number. Importing all the rows and summing them locally is much slower, because Sheets downloads the whole range over the network before your formula runs. The same logic applies to any big import: condense first, then import.
What breaks it
- Chains. If sheet B imports from A and C imports from B, an edit to A makes both reload. Long chains create long delays.
- Cycles. Two files importing from each other never settle and produce no output.
- Volatile functions. An import cannot reference NOW, RAND or RANDBETWEEN, directly or through another formula, and returns an error. TODAY is the one exception, because it changes only once a day.
- Size. Each request is capped at 10 MB of received data, and the function needs an internet connection because it is an external data function.
- Download protection. If the source file has "Disable options to download, print, and copy" turned on, new IMPORTRANGE formulas cannot export from it. Formulas set up before the setting was turned on keep working.
- Heavy use. Too many import calls across your files produces a "Loading..." cell and an error about the large number of requests. The limits apply to the person who created the document, not to whoever is viewing it.
How fresh the data is
While a file is open, IMPORTRANGE checks for updates about once an hour even if nothing changed. Deleting the cell, or overwriting it with the same formula, forces a reload; simply reopening the document does not.
When to use something else
Google suggests Apps Script, which can read other documents and run on a schedule, and Connected Sheets, which is built for larger imports and has scheduled refresh. If your IMPORTRANGE is slow or hitting limits every day, one of those is the better tool.
Related: How to Filter and Sort Data with QUERY pairs well with an import: bring the range in once, then shape it with a query.