Skip to content
Blog/Google Sheets
Google Sheets

How to Use IMPORTRANGE in Google Sheets

IMPORTRANGE pulls data from one Google Sheet into another — live, automatically updated. Here's the syntax, how to grant access, common errors, and how to combine it with other functions.

Do this with AI

Try Griddy free

Start in your browser. Also works with Excel and Google Sheets.

By Justin Freels//5 min read

IMPORTRANGE connects two Google Sheets files, pulling data from one into another and keeping it live. Any time the source file updates, the imported data updates too. It's how you consolidate data from multiple sheets without copy-pasting, and how you share a clean "view" of a sheet without giving anyone edit access to the source.

The syntax

fx
=IMPORTRANGE(spreadsheet_url, range_string)
  • spreadsheet_url — the full URL of the source Google Sheet (in quotes), or a cell reference containing the URL
  • range_string — the tab name and range in the source file, formatted as "SheetName!A1:D100"

Basic example

Pull columns A through D from the "Sales" tab of another file:

fx
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/", "Sales!A1:D100")

First-time setup: When you first use IMPORTRANGE to connect to a new file, you'll see a #REF! error. Click the cell → click "Allow access". This grants the destination sheet permission to read the source. You only need to do this once per source file.

TIP

Instead of using the full URL, put it in a cell (e.g., A1) and reference it: =IMPORTRANGE(A1, "Sales!A1:D100"). This makes it easy to switch source files without editing the formula.

Importing a specific range

To import only rows where data exists (not a fixed range that includes blanks):

Use a generous range like A1:Z10000 rather than trying to calculate exact bounds — IMPORTRANGE handles blank rows cleanly and won't cause performance issues for reasonable sizes.

Common errors

ErrorCauseFix
#REF! on first useAccess not grantedClick cell → Allow access
#REF! You don't have accessNo permission to source fileRequest edit or view access to the source
#REF! Internal errorInvalid URL or range stringCheck the URL and tab name (case-sensitive)
Data is staleKnown limitation — Sheets caches importsWait a few minutes, or open the source file to trigger a refresh

WATCH OUT

The range_string is case-sensitive for the sheet tab name. If the tab is called "Sales Data", "sales data!A:D" will return an error. Copy the tab name exactly.

Combining IMPORTRANGE with other functions

IMPORTRANGE returns an array, so you can wrap it directly in other functions:

Filter imported data on the fly:

fx
=FILTER(IMPORTRANGE("url", "Sales!A:D"), IMPORTRANGE("url", "Sales!C:C")="West")

Count rows from another file:

fx
=COUNTA(IMPORTRANGE("url", "Sales!A:A"))-1

The -1 removes the header row from the count.

Control permissions and refresh cost

The first time a destination file uses IMPORTRANGE, Google Sheets may ask you to allow access to the source. The person opening the destination needs access to the source file, and changing the source permission can stop the import later. Document the source URL and owner near the formula so the dependency is discoverable.

Import only the columns and rows the report needs. A bounded range is easier to audit and can reduce recalculation work compared with importing an entire sheet. If several formulas pull the same source, import one staging block and reference that block locally. Avoid chaining long IMPORTRANGE dependencies for time-sensitive dashboards; a delayed or unavailable source can make downstream views incomplete.

The Griddy way

IMPORTRANGE is powerful but brittle — URL changes, tab renames, and access issues break it silently. Just describe what you need to connect:

"Pull all rows from the Pipeline sheet in our CRM tracker where the Stage is 'Closed Won', into this reporting sheet"

Griddy builds the IMPORTRANGE with FILTER combination and handles the cross-file reference.

Sources

Do this with AI

Turn the instructions into a finished spreadsheet.

Tell Griddy what you need in plain English, then inspect and keep editing the result in the browser, Excel, or Google Sheets.

Try Griddy freeStart in your browser. No download required.
Also works withExcel Google Sheets

Use this on real templates

Pull live data between shared operating sheets

IMPORTRANGE is useful when teams want separate reporting or planning views without duplicating and manually pasting source data.

Marketing