0
0
Google-sheetsHow-ToBeginner ยท 3 min read

How to Use IMPORTRANGE in Google Sheets: Simple Guide

Use the IMPORTRANGE function in Google Sheets to pull data from one spreadsheet into another by specifying the source spreadsheet URL and the range of cells to import. The syntax is =IMPORTRANGE(spreadsheet_url, range_string), where spreadsheet_url is the link to the source sheet and range_string is the cell range like "Sheet1!A1:C10".
๐Ÿ“

Syntax

The IMPORTRANGE function has two parts:

  • spreadsheet_url: The full URL of the Google Sheets file you want to import data from.
  • range_string: The text specifying which cells to import, including the sheet name and cell range, like "Sheet1!A1:B5".

Example syntax:

plaintext
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123xyz456/edit", "Sheet1!A1:B5")
๐Ÿ’ป

Example

This example imports cells A1 to B3 from a sheet named "Sales" in another spreadsheet. You must replace the URL with your source spreadsheet's URL.

plaintext
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1a2b3c4d5e6f7g8h9i0jklmnopqrstu/edit", "Sales!A1:B3")
Output
Product Quantity Apples 50 Oranges 30
โš ๏ธ

Common Pitfalls

  • Permission Required: The first time you use IMPORTRANGE with a new spreadsheet, you must click "Allow access" to connect the sheets.
  • Incorrect URL: Using a wrong or incomplete URL will cause an error.
  • Wrong Range Format: The range string must include the sheet name and use an exclamation mark, like "Sheet1!A1:C10".
  • Empty or Protected Cells: Importing protected or empty cells may cause unexpected results.

Wrong example (missing sheet name):

plaintext
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1a2b3c4d5e6f7g8h9i0jklmnopqrstu/edit", "A1:B3")

Correct example (with sheet name):
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1a2b3c4d5e6f7g8h9i0jklmnopqrstu/edit", "Sales!A1:B3")
๐Ÿ“Š

Quick Reference

PartDescriptionExample
spreadsheet_urlFull URL of the source Google Sheethttps://docs.google.com/spreadsheets/d/abc123xyz456/edit
range_stringSheet name and cell range to importSheet1!A1:C10
PermissionMust allow access on first useClick 'Allow access' prompt
OutputImported data appears in your sheetData from source range
โœ…

Key Takeaways

Use IMPORTRANGE to import data from another Google Sheets file by specifying its URL and cell range.
Always include the sheet name in the range string, like "Sheet1!A1:B5".
Grant permission when prompted to allow data sharing between sheets.
Check the URL and range format carefully to avoid errors.
Imported data updates automatically when the source changes.