Import

Google Sheets IMPORTRANGE Function — Syntax, Examples & Tips

Learn how to use IMPORTRANGE in Google Sheets to pull data from another spreadsheet. Includes permission setup, combining with other functions, and troubleshooting.

Syntax
=IMPORTRANGE(spreadsheet_url, range_string)

What IMPORTRANGE Does

IMPORTRANGE imports a range of cells from one Google Sheets spreadsheet into another. It creates a live link between two files, so when the source data updates, the destination updates too. This is invaluable for consolidating reports, sharing data between teams, or building dashboards from multiple source sheets.

Syntax

=IMPORTRANGE(spreadsheet_url, range_string)
ParameterDescription
spreadsheet_urlThe full URL of the source spreadsheet, wrapped in quotes. You can also use just the spreadsheet ID (the long string between /d/ and /edit in the URL).
range_stringA string specifying the sheet name and cell range, e.g., "Sheet1!A1:D100".

Basic Examples

Example 1: Import a Simple Range

Pull rows 1-50 from a budget spreadsheet:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123/edit", "Budget!A1:E50")

Result: Cells A1:E50 from the "Budget" sheet in the other file are imported into the current cell and spill downward.

Example 2: Import an Entire Column

=IMPORTRANGE("abc123", "Sales!A:A")

You can pass just the spreadsheet ID instead of the full URL. This imports the entire column A from the Sales sheet.

Example 3: First-Time Access

The first time you use IMPORTRANGE with a new source spreadsheet, Google Sheets shows a #REF! error with an "Allow access" button. Click the cell, then click Allow access. This permission is granted once per source-destination pair and persists.

Advanced Examples

IMPORTRANGE + QUERY

Import data and filter it in one step. Pull only rows where the status is "Active":

=QUERY(IMPORTRANGE("abc123", "Clients!A1:F500"), "SELECT * WHERE Col4 = 'Active'")

This avoids importing the entire dataset and then filtering separately.

Consolidating Multiple Sheets

Stack data from two source files using curly braces:

={IMPORTRANGE("abc123", "Orders!A2:D"); IMPORTRANGE("xyz789", "Orders!A2:D")}

Both ranges must have the same number of columns. The semicolon stacks them vertically.

Common Mistakes

  • Forgetting to grant access. The #REF! error on first use is not a formula error — you just need to click the cell and press "Allow access." This trips up almost everyone the first time.
  • Importing too much data. Pulling thousands of rows with IMPORTRANGE can slow your spreadsheet significantly. Import only the range you need, or combine with QUERY to filter at the source.
  • Sheet names with spaces. If the source sheet name has spaces, it still works inside the range string (e.g., "Q1 Revenue!A1:C"). You do not need to add extra quotes around it within the IMPORTRANGE string.

SheetAI Tip

Don't want to memorize this syntax? With SheetAI, just type what you need in plain English — like "import the sales data from my other spreadsheet" — and the formula is generated for you. Install SheetAI to try it free.

Skip the formula. Describe what you need.

SheetAI lets you type what you want in plain English and generates the perfect formula — no syntax to memorize.

Try SheetAI Free