Quick Answer: IMPORTRANGE Syntax

To connect two Google Sheets, use the IMPORTRANGE formula:

=IMPORTRANGE("URL of the spreadsheet", "Source Range")

Example: =IMPORTRANGE("https://docs.google.com/...", "Sheet1!A1:B10")

Note: Ensure you include the quotation marks around both the URL and the range string.

Accessing data from one workbook to another in Google Sheets requires a specific function due to cloud security protocols. The IMPORTRANGE function solves this by creating a secure bridge between files.

This guide will walk you through the syntax, common errors (like #REF!), and how to use the imported data for further calculations.

The Anatomy of the IMPORTRANGE Function

The function requires two specific inputs, both enclosed in double quotes.

=IMPORTRANGE("spreadsheet_url", "range_string")
Input Parameter Description Example
URL of the spreadsheet The full web link (or key ID) of the source file. "https://docs.google.com/..."
Source Range The tab name and cell range to grab. "Sheet1!A1:C20"

1. The URL of the Spreadsheet (Source)

You can copy the entire URL from your browser bar. Alternatively, you can use just the “Spreadsheet ID” (the long string of alphanumeric characters between the forward slashes).

Copy the full URL or just the Key ID.

2. The Source Range (Target)

This tells Google exactly where to look in the imported sheet. It follows the format: "SheetName!Cells". That tells Google Sheets which spreadsheet to reference and which range of cells you want to import.

  • Specific Tab: "Employees!A1:B10" (Recommended)
  • Default Tab: "A1:B10" (Defaults to the first sheet; use with caution)
  • Single Cell: "Summary!B5"

Crucial Tip: Do not forget the quotation marks and the exclamation point separator!

If you see an error message, usually while the cell says “loading…”, you may need to grant permission before the rows of data are imported into your destination spreadsheet.

Step-by-Step: How to Imports Data Between Sheets

Letโ€™s say you have a master Inventory Template and you want to pull stock levels from a separate “Warehouse” sheet.

  1. Get the Source URL: Open the “Warehouse” workbook and copy the URL of the spreadsheet.
  2. Select Destination: Open your Master sheet and click the cell where you want data to start.
  3. Type Formula: Enter =IMPORTRANGE( followed by the URL in quotes.
  4. Add Range: Add a comma, then type the source range string inside quotes. Close the parenthesis.
  5. Grant Access: You will see a #REF! error. Hover over it and click the blue “Allow Access” button.
You only need to do this once per sheet pair.

Alternative: Using Special Paste (Static Data)

If you don’t need a live link (which updates automatically), you can use Special Paste to copy data once.

  1. Copy the data from the source sheet.
  2. Go to the destination sheet.
  3. Right-click > Paste special > Values only.

However, for dynamic dashboards where data changes often, the IMPORTRANGE formula is superior.

Troubleshooting: Why is IMPORTRANGE Not Working?

If your data isn’t loading, check this table for the most common causes.

Error / Issue Likely Cause Fix
#REF! Permission not granted. Hover over cell & click “Allow Access”.
#N/A Typos in range string. Check spelling of Sheet Name (e.g., “Sheet1” vs “Sheet 1”).
Formula Parse Error Missing quotes or parenthesis. Ensure URL and Range are both inside "" and closed with ).

Advanced: Performing Calculations on Imports

Raw imports are rarely enough. Usually, you want to perform calculations on the data as it arrives. This is perfect for creating dynamic reports, such as a Profit and Loss statement.

1. Summing Imported Data

You can wrap the import function inside a SUM function directly.

=SUM(IMPORTRANGE("URL", "Sales!B2:B100"))

2. Filtering with QUERY

Import only specific rows (e.g., “Sales over $500”).

=QUERY(IMPORTRANGE("URL", "Data!A:E"), "SELECT * WHERE Col2 > 500")

Note: When querying an import, you must use Col1, Col2 notation instead of A, B.

Frequently Asked Questions

Is IMPORTRANGE dynamic?

Yes. If you change data in the source sheet, the destination sheet updates automatically. However, there is a slight delay (usually a few seconds to a minute).

Can I import from multiple sheets at once?

Yes, by using array brackets {}. For example: ={IMPORTRANGE("URL1", "Range"); IMPORTRANGE("URL2", "Range")}. This allows you to stack data from multiple sources, which is ideal for a master Dashboard.

Conclusion

The IMPORTRANGE function is the bridge that turns isolated spreadsheets into a connected ecosystem. Whether you are building a business budget or managing a team schedule, mastering this function saves hours of manual copy-pasting.

Ready to practice? Try connecting data between our free templates: