The IMPORTRANGE function in Google Sheets allows you to import data between multiple spreadsheets. To understand the formula of the IMPORTRANGE function better, you need to first understand the general structure of a Google Sheet.
A Google Sheet is hosted online and thus can be identified by an URL (like any other webpage). Inside the sheet we have multiple tabs & in each tab data is stored within a range of rows and columns.
To get data from a particular spreadsheet, we need to know:
- The URL of the Spreadsheet you want to pull the data from
- The tab within the sheet where the data is located
- The range of the data
IMPORTRANGE function Formula
If you understand the above structure, understanding the IMPORTRANGE formula won’t be much of a trouble:
= IMPORTRANGE(spreadsheet_url, range_string)
Spreadsheet url of a particular Google sheet is available in the top URL bar , when the sheet is loaded in a browser.
The range_string contains the data range (including the tab). To understand better check the below example:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1Hh2grfB6rp9OQ2yAIu3S5YF_CCFJGwyqPGveABlOZKg/edit", "World Cup!A1:D21")
The above formula would ping the mentioned URL and get the data from cell A1 to D21 located in the tab named “World Cup” .
When you type in the above formula in cell A1 of a sheet , here’s what you can expect to see:
Uses of IMPORTRANGE Function in Google Sheets
IMPORTRANGE allows you to combine multiple Google Sheets
More often than not, we encounter situations where the base data is continuously updated in a Google Sheet. We may not want to disturb this sheet. In such cases, we can import whatever data we need to our worksheet using IMPORTRANGE.
IMPORTRANGE can help with data privacy
We may have a situation , whereby we want to keep certain fields private while exposing the rest. In such cases we could use IMPORTRANGE to import the data that we need to the open sheet. Do note if the , source sheet isn’t shared openly, we would need to manually allow IMPORTRANGE to pull out data from it.
FAQs : IMPORTRANGE in Google Sheets
You can pull data from one Google spreadsheet to another using the IMPORTRANGE function.
You can reference another workbook in Google Sheets by using the URL of the workbook.