IMPORTRANGE: Connect Google Sheets Like a Database
IMPORTRANGE pulls data from one Google Sheet into another, live. Changes in the source sheet appear automatically.
Pull live data between spreadsheets with IMPORTRANGE. Combined with QUERY, it's the closest thing to a database in Google Sheets.
IMPORTRANGE pulls data from one Google Sheet into another, live. Changes in the source sheet appear automatically. It's the simplest way to create a connected system of spreadsheets without scripts or external tools.
Basic Syntax
=IMPORTRANGE(spreadsheet_url, range_string)
// Example
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123", "Sheet1!A1:D100")The first time you use IMPORTRANGE with a new source, you'll see a #REF! error. Click the cell and click "Allow access" — this is a one-time permission per source spreadsheet.
IMPORTRANGE + QUERY
The real power comes from combining IMPORTRANGE with QUERY. Pull data from another sheet and filter it in one formula:
=QUERY(IMPORTRANGE(url, "Sheet1!A:E"), "SELECT Col1, Col2, Col5 WHERE Col3 = 'Active'")Note: when using IMPORTRANGE inside QUERY, use Col1, Col2 etc. instead of letter references.
Performance Tips
- Limit the range —
A1:D1000is faster thanA:D. Only import what you need. - Cache with a helper sheet — import to a hidden sheet, then reference that sheet. Reduces recalculation.
- Avoid too many IMPORTRANGE calls — each call makes a network request. More than 10-15 per sheet can cause slowdowns.
- Named ranges work — you can use
"NamedRange"instead of"Sheet1!A1:D100"
Common Errors
- #REF! (needs permission) — click the cell, click "Allow access"
- #REF! (range not found) — check the sheet name and range. Sheet names with spaces need quotes:
"'My Sheet'!A:D" - Loading... — large ranges or many IMPORTRANGE calls can be slow. Be patient or reduce range size.
- Results don't update — IMPORTRANGE caches for ~30 minutes. Add a dummy volatile function like
NOW()to force refresh.
Generate Connected Formulas
Describe what data you need to pull and how to filter it. Formula Genius generates IMPORTRANGE + QUERY combinations that work — validated before you paste.