Templates, guides & honest tool reviews for small business

Sunday, November 29, 2026

How to Use IMPORTRANGE in Google Sheets: Free Step-by-Step Guide

How to use IMPORTRANGE in Google Sheets: formula, permission and QUERY

IMPORTRANGE in Google Sheets pulls data from one spreadsheet into another, and keeps it up to date. If you have ever copied numbers between files by hand, this one formula saves time. This guide shows how to use IMPORTRANGE in Google Sheets step by step, how to fix the permission error, and how to combine it with QUERY, VLOOKUP and multiple sheets.

What is IMPORTRANGE in Google Sheets?

IMPORTRANGE is a built-in function that reads a range from a different Google Sheets file. The data stays in the original file, and your new file shows a live copy. The IMPORTRANGE formula in Google Sheets has two parts:

=IMPORTRANGE("spreadsheet_url", "range_string")

  • spreadsheet_url is the full web address of the source file, or just its ID (the long text between /d/ and /edit in the address). Put it in quotes.
  • range_string is the tab name and cell range, also in quotes, for example "Sales!A1:D50". If you leave out the tab name, Sheets uses the first tab.
IMPORTRANGE Google Sheets formula: spreadsheet URL and range string explained
The two parts of the formula (illustration).

How to use IMPORTRANGE in Google Sheets: 5 steps

  1. Open the source file and copy its address from the browser bar.
  2. Open the file where you want the data and click an empty cell, such as A1.
  3. Type the formula with the address and range, for example =IMPORTRANGE("PASTE-THE-URL-HERE","Sales!A1:D50"), then press Enter.
  4. Allow access. The cell shows #REF! the first time. Click the cell and choose Allow access.
  5. Check the result. The data should fill the cells below and to the right. Leave those cells empty, or Sheets cannot show the data.

You need at least view access to the source file. If you cannot open the source file yourself, the formula will not work either.

IMPORTRANGE error you need to connect these sheets: how to allow access
Why the first result shows #REF! and how to fix it (illustration; button names may differ slightly).

IMPORTRANGE error: "You need to connect these sheets"

This message is not a real fault. It is Google asking you to confirm that the two files may share data. Click the cell, then click Allow access. You only do this once for each pair of files. If the error stays, check these common causes:

  • The address or the tab name has a typo. Tab names are case sensitive in the range text.
  • The range is missing quotes around the address or the range.
  • Your account has no access to the source file.
  • The cells where the data should appear already contain something.
IMPORTRANGE with QUERY in Google Sheets: select columns and filter rows
Filter imported data with QUERY (illustration with made-up data).

IMPORTRANGE with QUERY: filter the imported data

To bring in only some columns or rows, wrap IMPORTRANGE in QUERY. QUERY refers to imported columns as Col1, Col2, Col3 and so on:

=QUERY(IMPORTRANGE("URL","Sales!A1:D50"),"select Col1, Col3 where Col4 > 100",1)

This shows columns 1 and 3 for rows where column 4 is above 100. The last number, 1, tells QUERY that the first row holds headings. Filtering this way keeps the new file smaller and easier to read. If you build summary pages, pair it with a Google Sheets dashboard.

IMPORTRANGE Google Sheets multiple sheets: stack ranges with curly brackets
Stack several ranges into one table (illustration).

IMPORTRANGE with multiple sheets and tabs

Each IMPORTRANGE reads one range. To combine several tabs or files, put the formulas inside curly brackets and separate them with a semicolon, which stacks them one under the other:

={IMPORTRANGE("URL1","Jan!A2:C20");IMPORTRANGE("URL2","Feb!A2:C20")}

Each range must have the same number of columns, or Sheets shows an error. Start from row 2 so the headings do not repeat. Before you combine data, you may want to remove duplicates in Google Sheets in the source tabs.

IMPORTRANGE with VLOOKUP

You can look up a value in another file by using IMPORTRANGE as the lookup table:

=VLOOKUP(A2, IMPORTRANGE("URL","Prices!A:C"), 3, FALSE)

This finds the value in A2 in the first column of the imported range and returns the third column. For a newer option, read our guide on XLOOKUP vs VLOOKUP.

IMPORTRANGE in Google Sheets: common questions

Does IMPORTRANGE update automatically?

Yes. It refreshes when the source data changes, though a short delay is normal. If it looks stuck, check that the range is correct and that you still have access to the source file.

Why is IMPORTRANGE not working?

The most common causes are missing permission, a typo in the address or tab name, missing quotes, or cells in the way. Work through the list in the error section above.

Can IMPORTRANGE copy formatting?

No. It brings in values only, not colors, borders or number formats. Format the cells in the new file yourself, for example with a conditional formatting rule.

Related guides on Smart Work Tools

Track work across files with the task tracker Google Sheets template, and add menus with a drop down list.

No comments:

Post a Comment