Google Sheets Function Guide

Google Sheets IMPORTRANGE: Pull Live Data Across Spreadsheets

Use =IMPORTRANGE(spreadsheet_url_or_key, "range_string") to sync rows from another Google Sheet automatically without copying and pasting.

1. Basic Syntax & First-Time Access

The syntax for IMPORTRANGE is:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit", "Sheet1!A1:E100")

2. Worked Example: Centralizing Regional Logs

Suppose a team keeps separate monthly or regional sheets and you want a master summary file to pull clean rows automatically:

Workflow Goal Formula Example What Happens
Import basic range =IMPORTRANGE("https://docs.google.com/spreadsheets/d/ABC123/edit", "Expenses!A1:D50") Pulls A1:D50 from the Expenses tab and updates when source values change.
Filter imported rows with QUERY =QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/ABC123/edit", "Expenses!A1:D50"), "SELECT Col1, Col3, Col4 WHERE Col2 = 'Paid'", 1) Filters only Paid rows and selects columns 1, 3, and 4. Notice QUERY uses Col1, Col2... on IMPORTRANGE results.
Stack two sheets vertically ={IMPORTRANGE("ID_SHEET_1","Jan!A2:D50"); IMPORTRANGE("ID_SHEET_2","Feb!A2:D50")} Combines two imported ranges into one continuous table (both must have the same column count).

Important syntax tip: When wrapping IMPORTRANGE inside QUERY, use Col1, Col2, Col3 (capital C, lowercase ol) instead of column letters A, B, C.

3. Common IMPORTRANGE Errors & Fixes

Related Guides & Tools: Pair this with Google Sheets QUERY Function Guide, FILTER & UNIQUE Dynamic Lists, Fix #REF! Error Guide, or grab a starter workbook from the Templates Pack.

4. Combining IMPORTRANGE With QUERY for Filtered Syncs

Instead of importing 5,000 raw rows only to filter them later, wrap IMPORTRANGE inside QUERY to pull only the columns and rows your dashboard needs:

=IFERROR(QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/SHEET_ID/edit", "Sales!A1:E200"), "SELECT Col1, Col2, Col5 WHERE Col4 = 'Active'", 1), "Check Permissions")
Watch Out for Col1 vs. Column Letters: Once data passes through IMPORTRANGE or { } array braces inside QUERY, refer to columns as Col1, Col2, Col3 rather than A, B, C.