IMPORTRANGE Function
IMPORTRANGE imports a range from another Google Sheets file by its spreadsheet URL and a range reference.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| spreadsheet_url | The full URL of the Google Sheets workbook to import from. The workbook must be accessible to you. | Required |
| range_string | The sheet name and range to import, e.g. 'Sheet1'!A1:C10. If the sheet name contains spaces, wrap it in single quotes. | Required |
Basic Example
Import sales data from another spreadsheet
=IMPORTRANGE('https://docs.google.com/spreadsheets/d/abc123', 'Sales'!A1:C100)The first time you use this formula, you must authorize access to the source spreadsheet. After that, the range updates automatically when the source changes.
Advanced Examples
Example 1: Import and wrap with QUERY
Cross-sheet reportingImport only columns A and B where column C is 'Approved'
=QUERY(IMPORTRANGE('https://docs.google.com/spreadsheets/d/abc123', 'Orders'!A1:D1000'), 'SELECT Col1, Col2 WHERE Col4 = "Approved"')Example 2: Dynamic source sheet via cell reference
Multi-location consolidationBuild the IMPORTRANGE URL from cells so it is easy to change
=IMPORTRANGE(A2, B2&"!A1:C100")How IMPORTRANGE Works
IMPORTRANGE connects to the Google Sheets API, reads the specified range from the source workbook, and returns the values into the target sheet. The first use requires explicit authorization. It refreshes automatically on a schedule, typically within a few minutes of source changes.
Important Notes & Limitations
IMPORTRANGE is Google Sheets only; Excel uses Power Query, external links, or workbook links instead.
The first use requires manual authorization, which can break automated reports until allowed.
Heavy use of IMPORTRANGE can slow down a spreadsheet or hit Google Sheets limits.
It only imports values; formulas, formatting, and conditional formatting are not carried over.
Common Errors & Fixes
#REF! or loading errorThe source spreadsheet is not shared or the URL is incorrect.Fix: Check the URL, ensure the source workbook is accessible, and re-authorize IMPORTRANGE.
Formula result not updatingGoogle Sheets caches IMPORTRANGE results and updates on a schedule.Fix: Wait a few minutes, edit the source to trigger recalculation, or use a helper cell to force refresh.
Sheet name errorThe sheet name is misspelled or contains spaces without quotes.Fix: Wrap sheet names with spaces in single quotes: 'Sales Data'!A1:C100.
Download Practice File
IMPORTRANGE
importrangePractice IMPORTRANGE with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the IMPORTRANGE function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps