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

  1. Open the source spreadsheet and copy its URL from the browser bar.
  2. In your destination sheet, pick a cell and type:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/ABC123/edit", "Sheet1!A1:B10")
  1. Press Enter. A blue “Allow access” button appears — click it.
  2. The data appears. It updates automatically whenever the source changes.

The two arguments

  1. spreadsheet_url — the full URL of the source sheet, in quotes.
  2. 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:

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)

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?

GoalFormula
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

ProblemFix
#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 QUERYWrong Col numbers, or the header count is off
Doesn’t refreshIMPORTRANGE 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.