Arrow left
Back to guides
Google Sheets Formulas

How to Use IMPORTRANGE Function in Google Sheets

In this article, you will learn how to refer to a range in another Google Sheets file by the IMPORTRANGE function. In Google Sheets, you can’t refer to another file without any formula, so this function is beneficial for connecting two files and keeping imported information updated.

How to use IMPORTRANGE formula in Google Sheets

  1. Type in “IMPORTRANGE” or navigate to the “Insert” tab (or “Functions” icon) → “Function”“Web”“IMPORTRANGE”.
  2. Open a Google Sheets file you want to refer to.
  3. Copy the URL of the file.
  4. Insert the URL in the formula and enclose it wilt quotation marks.
  5. Type in a sheet name and range in the formula and surround them with quotation marks.
  6. As you see “#REF” in the cell and its note stating, “You need to connect these sheets”, click “Allow access” in the note.
How to insert the IMPORTRANGE function in Google Sheets

The general syntax is as follows:

=IMPORTRANGE(spreadsheet_url, range_string)

Spredseet_url: You need to insert an URL in this argument. The quotation marks must be added at the beginning and end of the URL such as XXX.

Range_srting: This argument requires a sheet name and range. The two items must be combined with “!”, an exclamation mark, and enclosed with quotation marks. You can type in Named Range instead of inputting row and column indexes for the range in the referred file. For example, if you want to refer to a range of B2:F17 on a sheet named Sample, the argument should be “Sample!B2:F17”.

Look at a more specific example. Assume you want to refer to the data under the following assumptions.

URL: https://docs.google.com/spreadsheets/d/1BmOfn6fpSZFQ-Ld2Ec65e8ZKX9ccFWggfWov5u37TNQ/edit#gid=2029313979

Sheet: Consolidated P&L Dashboard

Range: A16:F24

With these assumptions, the IMPORTRANGE formula must look as below.

=IMPORTRANGE(https://docs.google.com/spreadsheets/d/1BmOfn6fpSZFQ-Ld2Ec65e8ZKX9ccFWggfWov5u37TNQ/edit#gid=2029313979, Consolidated P&L Dashboard!A16:F24)

What “Allow access” button looks like in Google Sheets

Once you allow access and wait until the formula completes loading, you can see values from the referred range, as shown below.

What the imported data by the IMPORTRANGE function look like in Google Sheets

Note the following points:

  1. You need to secure enough space for the formula to spread the imported values.
  2. The formula imports values without formatting, row height, or column width. So, you need to copy and paste the formatting in the source file if needed.
  3. If there is any update in the selected range in the source file, the IMPORTRANGE function reflects the change immediately, so the imported information is always up-to-date.

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how

Need help?

Our team is here to help you any time between 9am and 10pm EST.
Check Icon
Email us at: help@liveflow.io

Liked this article? Then you'll love the ones below