If you’re managing data across multiple Google Sheets, constantly copy-pasting between files can be a real headache. That’s where the IMPORTRANGE function comes in—it lets you pull data from one sheet into another, automatically.
While the QUERY function is great for filtering and analyzing data within a single sheet, IMPORTRANGE shines when you need to work across multiple spreadsheets. It’s a must-have tool for teams, reports, dashboards, and collaborative workflows.
This guide will show you how to use IMPORTRANGE with real-life examples, how to combine it with QUERY for advanced filtering, and how to avoid common mistakes.
What Is IMPORTRANGE in Google Sheets?
IMPORTRANGE is a function that lets you import a range of data from one Google Sheet to another using the sheet’s URL and the specific range to pull.
Basic Syntax:
=IMPORTRANGE("spreadsheet_url", "sheet_name!range")
spreadsheet_url
: The full URL of the Google Sheet you want to pull data from.sheet_name!range
: The specific sheet and cell range, likeSheet1!A1:C10
.
Real-Life Example: Importing Sales Data
Imagine you have two spreadsheets:
- Master Sales Sheet – where you want all data to be collected
- Team A Sheet – where Team A logs their sales
Step 1: Get the Source Sheet URL
Open the Team A Sheet, copy the URL from the browser address bar.
Step 2: Use IMPORTRANGE in the Master Sheet
In any cell of the Master Sheet, enter the formula:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123xyz456", "Sales!A1:D20")
The first time you do this, you’ll see a #REF! error with a button saying “Allow Access”. Click it to grant permission between the sheets.
Sample Data (Team A Sheet)
Date | Salesperson | Product | Revenue |
---|---|---|---|
2024-04-01 | John | Tablet | 300 |
2024-04-02 | Sarah | Laptop | 800 |
Now this data will appear in your Master Sheet, automatically synced!
Bonus: Combine QUERY with IMPORTRANGE
If you only want to import certain rows (e.g., revenue above $500), wrap IMPORTRANGE inside a QUERY function:
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123xyz456", "Sales!A1:D20"),
"SELECT Col1, Col2, Col3, Col4 WHERE Col4 > 500", 1)
This is powerful—you’re pulling and filtering data at the same time!
Tips for Using IMPORTRANGE
- Always include full spreadsheet URLs—shortened links won’t work.
- Use named ranges in the source sheet to make formulas easier.
- Each new sheet you connect will require permission once.
- If the source sheet gets renamed, update your IMPORTRANGE formula accordingly.
Common Errors and Fixes
- #REF! – Usually means access wasn’t granted yet. Click “Allow Access.”
- #VALUE! – May happen if you mistype the range or use a broken URL.
- Loading forever – Large ranges or complex queries may slow things down. Try limiting the imported range.
Quick IMPORTRANGE Cheat Sheet
- Basic formula:
=IMPORTRANGE("sheet_url", "Sheet1!A1:D10")
- With QUERY:
=QUERY(IMPORTRANGE(...), "SELECT ... WHERE ...")
- One-time access required: Click “Allow Access” after first use
- Pro Tip: Combine with functions like SORT, FILTER, and UNIQUE
IMPORTRANGE is a game-changer for anyone working across multiple Google Sheets. Whether you’re combining reports from different departments, tracking shared data, or building a dashboard, this function saves time and eliminates manual errors.
And when paired with QUERY? You get a powerhouse combo for automated data workflows.
Start simple—import a range—and once you’re comfortable, experiment with filtering and combining data. Your spreadsheets will thank you.