If you manage a large project or business across multiple departments, you probably have several separate Google Sheets spreadsheets: one for Marketing’s budget, one for Sales pipeline data, and one for HR employee records. When you need to build a master dashboard that combines data from all these separate files, manually copying and pasting data between them is tedious and guarantees that your dashboard will become outdated the moment someone updates the source spreadsheet.
The IMPORTRANGE function solves this problem elegantly. It creates a live, permanent link between two separate Google Sheets files, automatically pulling data from one spreadsheet into another in real-time. Any time the source data is updated, your master dashboard reflects the changes instantly.
Understanding the Syntax
The function requires two pieces of information: the URL of the source spreadsheet, and the specific cells you want to import.
=IMPORTRANGE("spreadsheet_url", "sheet_name!range")
- spreadsheet_url: The full web address of the Google Sheet you want to pull data from. You can find this by opening the source spreadsheet in your browser and copying the URL from the address bar.
- sheet_name!range: The specific tab name and cell range you want to import. For example,
"Sheet1!A1:D50"imports columns A through D, rows 1 through 50, from the tab named “Sheet1”.
How to Pull Data from Another Spreadsheet
- Open the source spreadsheet (the one containing the data you want to import). Copy the full URL from your browser’s address bar.
- Open the destination spreadsheet (the one where you want the imported data to appear).
- Click into the cell where you want the data to begin populating (e.g., cell A1).
- Type the formula:
(Replace the URL with your actual copied URL, and replace “Sales Data!A1:E100” with the actual sheet name and cell range).=IMPORTRANGE("https://docs.google.com/spreadsheets/d/XXXXX", "Sales Data!A1:E100") - Press Enter.
How to Grant Access Permission
The first time you use IMPORTRANGE to connect two spreadsheets, Google will display a #REF! error in the cell. This is expected.
- Click on the cell displaying the error.
- A small pop-up tooltip will appear saying “You need to connect these sheets.”
- Click the blue Allow access button.
This permission is permanent for that specific pair of spreadsheets. You only need to grant access once. After granting access, the cell will immediately populate with the live data from the source spreadsheet.
Combining IMPORTRANGE with Other Functions
The imported data behaves exactly like normal spreadsheet data once it arrives. You can wrap IMPORTRANGE inside other powerful functions to create dynamic dashboards:
- QUERY + IMPORTRANGE: Pull data from an external spreadsheet and filter it simultaneously.
=QUERY(IMPORTRANGE("url", "Sheet1!A1:D100"), "SELECT Col1, Col4 WHERE Col2 = 'London'") - SUMIF + IMPORTRANGE: Calculate a sum from external data based on a condition.
=SUMIF(IMPORTRANGE("url", "Sheet1!A:A"), "Marketing", IMPORTRANGE("url", "Sheet1!C:C"))
These combinations allow you to build a master reporting spreadsheet that pulls live data from dozens of separate department files.