Quick Answer

IMPORTRANGE Function

IMPORTRANGE imports a range from another Google Sheets file by its spreadsheet URL and a range reference.

✓ Excel✓ Google SheetsExcel Google Sheets only

Syntax

IMPORTRANGE
(spreadsheet_url, range_string)

Parameters

ParameterDescriptionRequired
spreadsheet_urlThe full URL of the Google Sheets workbook to import from. The workbook must be accessible to you.Required
range_stringThe 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)
ResultData from the other sheet

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 reporting

Import 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"')
Result: Filtered imported data
QUERY filters the imported data after it arrives. Col1 refers to the first imported column.

Example 2: Dynamic source sheet via cell reference

Multi-location consolidation

Build the IMPORTRANGE URL from cells so it is easy to change

=IMPORTRANGE(A2, B2&"!A1:C100")
Result: Range pulled from the workbook in A2 and sheet in B2
You can concatenate the sheet name and range to make the formula dynamic.

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.

1
Copy the source spreadsheet URL
Open the source workbook and copy the URL from the browser address bar.
2
Identify the range
Note the sheet name and the cell range you want to import, e.g. 'Sheet1'!A1:D50.
3
Enter the formula
Type =IMPORTRANGE('URL', 'Sheet'!A1:D50) in the target cell.
4
Authorize access
Click the Allow access button that appears the first time the formula runs.
5
Filter or transform
Wrap the formula with QUERY, FILTER, or ARRAYFORMULA if needed.

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

Practice 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.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

Can I import from an Excel file?
No, IMPORTRANGE only works with Google Sheets. For Excel, convert the file to Google Sheets first or use Power Query.
How do I update IMPORTRANGE data?
It updates automatically, but not instantly. Edits in the source propagate within minutes.
Can I import filtered data?
Yes, wrap IMPORTRANGE with QUERY or FILTER to pull only the rows you need.
Why do I keep seeing 'Loading...'?
The source may be large, access may not be authorized, or the source sheet may be private. Check sharing and permissions.