How to Use IMPORTRANGE in Google Sheets (Query & Filter)
IMPORTRANGE pulls data from one Google Sheet into another in real time. The formula is =IMPORTRANGE("spreadsheet_url", "Sheet1!A1:B10"). The first time you use a new source sheet, click Allow access to grant permission. This guide covers the basics plus the most-requested combos: IMPORTRANGE with QUERY, FILTER, and VLOOKUP.
Step by step
- Open the source spreadsheet and copy its URL from the browser bar.
- In your destination sheet, pick a cell and type:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/ABC123/edit", "Sheet1!A1:B10")
- Press Enter. A blue “Allow access” button appears — click it.
- The data appears. It updates automatically whenever the source changes.
The two arguments
- spreadsheet_url — the full URL of the source sheet, in quotes.
- range_string — the sheet name and range to import, in quotes, e.g.
"Sheet1!A1:B10".
You can use just the sheet’s ID instead of the full URL, but the full URL always works.
Import an entire sheet
To import a whole sheet, widen the range to the last column, or just name the sheet:
- A generous range:
=IMPORTRANGE("url", "Sheet1!A:Z") - Entire sheet (all rows and columns):
=IMPORTRANGE("url", "Sheet1")
Using "Sheet1" (no range) imports everything on that tab.
IMPORTRANGE + QUERY (the power combo)
QUERY lets you import specific columns and rows from another sheet — the most common advanced use:
=QUERY(IMPORTRANGE("url", "Sheet1!A:C"), "select Col1, Col3 where Col2 > 10", 1)
- Col1, Col2, Col3 refer to the imported columns (not letters like A/B/C).
- The final
1means the source has one header row. "select Col1, Col3 where Col2 > 10"pulls columns 1 and 3, only where column 2 is above 10.
This is how you import and filter another sheet in one formula.
IMPORTRANGE + FILTER
FILTER does the same job with a different syntax:
=FILTER(IMPORTRANGE("url", "Sheet1!A:B"), IMPORTRANGE("url", "Sheet1!B:B") > 10)
Pulls rows from columns A and B where column B is greater than 10. (QUERY is usually more flexible; FILTER is simpler for basic conditions.)
IMPORTRANGE + VLOOKUP
To look up a value that lives in another spreadsheet:
=VLOOKUP(E2, IMPORTRANGE("url", "Sheet1!A:B"), 2, FALSE)
This is a common way to build a “master” sheet that pulls matching values from a source file. For more, see how to use VLOOKUP in Google Sheets.
Which combo should you use?
| Goal | Formula |
|---|---|
| Pull a whole sheet | =IMPORTRANGE(url, "Sheet1") |
| Pull specific columns/rows | =QUERY(IMPORTRANGE(...), "select ...") |
| Filter by a condition | =FILTER(IMPORTRANGE(...), ...) |
| Look up a matching value | =VLOOKUP(..., IMPORTRANGE(...), ...) |
Troubleshooting
| Problem | Fix |
|---|---|
| #REF! | You haven’t granted access — hover the error and click Allow access |
| #REF! (after access) | The range_string or sheet name is wrong |
| #N/A in QUERY | Wrong Col numbers, or the header count is off |
| Doesn’t refresh | IMPORTRANGE updates within ~1 hour or on edit — it’s not instant |
FAQ
How do I import data from another Google Sheet?
Use =IMPORTRANGE("source_url", "Sheet1!A1:B10"), then click Allow access once. The data then syncs automatically.
How do I use IMPORTRANGE with QUERY?
Wrap it: =QUERY(IMPORTRANGE("url", "Sheet1!A:C"), "select Col1, Col3 where Col2 > 10", 1). Reference imported columns as Col1, Col2, etc.
Can IMPORTRANGE pull an entire sheet?
Yes — use =IMPORTRANGE("url", "Sheet1") (just the sheet name) to import every cell on that tab. For whole columns in one range, use "Sheet1!A:Z".
Why do I see #REF! instead of data?
You haven’t granted access yet, or the range_string is wrong. Hover the #REF! and click Allow access, then check the sheet name matches exactly.
Does IMPORTRANGE update automatically?
Yes — the imported data refreshes whenever the source spreadsheet changes (with a brief delay, up to an hour).
Can I IMPORTRANGE from a sheet I don’t own?
Only if you have at least view access to it. You’ll still need to click “Allow access” once.
How do I import more than one range?
Use a separate IMPORTRANGE for each range, or import a larger range and filter it down with QUERY/FILTER. For basic lookups, see how to use VLOOKUP in Google Sheets. For the fundamentals, see Google Sheets formulas for beginners.
What’s the difference between IMPORTRANGE and IMPORTHTML?
IMPORTRANGE pulls from another Google Sheet. IMPORTHTML and IMPORTXML pull data from web pages instead — a different tool for a different job.
Related guides
Google Sheets Formulas for Beginners (10 You Need to Know)
The 10 essential Google Sheets formulas every beginner needs — SUM, AVERAGE, COUNT, IF, and more, with working examples.
How to Add Checkboxes in Google Sheets (Tick Boxes)
Add checkboxes in Google Sheets with Insert → Checkbox, set custom checked/unchecked values, and count ticks with COUNTIF or a progress bar.
How to Create a Drop-Down List in Excel (Data Validation)
Add a drop-down list in Excel with Data Validation — pick from a typed list or a range on another sheet, and fix the errors that stop it working.