To use IMPORTRANGE in Google Sheets, click an empty cell in the spreadsheet that should receive the data and type =IMPORTRANGE("source spreadsheet URL", "Sheet name!A1:D50"), then press Enter. The first time you connect two files, the cell shows a #REF! error. Hover over it or click it and choose Allow access. The data then appears and stays linked to the original file, so changes in the source show up in your copy automatically.
That is the whole idea, but the details trip people up: where the URL goes, how to write the sheet name, why the cell says Loading for a while, and how to import only some rows. This guide walks through each part with a worked example, then covers combining IMPORTRANGE with QUERY and FILTER, how often it refreshes, the limits Google sets, and how to fix every common error.
What you need and which versions this covers
- Two Google Sheets files. The source spreadsheet holds the original data. The destination spreadsheet is where you type the formula. IMPORTRANGE only connects separate files; for another tab in the same file, a normal cell reference is simpler (see the FAQ).
- At least view access to the source. You do not need to own it, but your Google account must be able to open it.
- Google Sheets in a web browser. These steps are for Sheets at sheets.google.com on Windows, Mac or ChromeOS, with a personal Google account or a work or school (Google Workspace) account. Existing IMPORTRANGE formulas also calculate in the Sheets mobile apps, but make the first connection on a computer, where the Allow access prompt is easiest to reach.
- A real Google Sheets file, not an Excel file. If the source is an .xlsx file stored in Drive, open it and choose File > Save as Google Sheets first, then use the URL of the new copy.
IMPORTRANGE is a Google Sheets function. Microsoft Excel does not have it, so the formula will not work if you download the file as .xlsx.
IMPORTRANGE syntax explained
The formula has two parts, and both are text, so each goes inside double quotation marks unless you point to a cell that holds the text.
=IMPORTRANGE(spreadsheet_url, range_string)
| Part | What to enter | Example |
|---|---|---|
| spreadsheet_url | The web address of the source spreadsheet, in quotes, or a reference to a cell that contains it | “https://docs.google.com/spreadsheets/d/1AbC…xyz/edit” |
| range_string | The tab name, an exclamation point, and the cell range, in quotes | “Q3 Orders!A1:E200” |
Spreadsheet URL vs spreadsheet key
Every Google Sheets URL contains a long ID, often called the spreadsheet key, between /d/ and the next slash. In https://docs.google.com/spreadsheets/d/1AbCdEfGh123/edit#gid=0, the key is 1AbCdEfGh123. Google’s own examples use the full URL, and that is the safest choice. Many people paste only the key, which keeps the formula shorter and is widely used, but if a key-only formula ever fails, switch to the full URL. The #gid= part at the end only says which tab was open in your browser; it does not choose the tab that gets imported.
Writing the range string
- Include the tab name. If you leave it out, as in
"A1:E200", IMPORTRANGE reads from the first tab in the source file. Adding the name protects you if someone reorders the tabs. - Wrap names with spaces or symbols in single quotes.
"'Q3 Orders'!A1:E200"is the safe form. The single quotes sit inside the double quotes. - A single cell works too.
"Summary!B2"imports one value. - Whole columns are allowed.
"'Q3 Orders'!A:E"picks up rows added later, at the cost of some speed (see Limits). - Named ranges and tables work. Google documents both a named range such as
"Sales_total"and a table reference such as"DeptSales[Sales Amount]"as valid range strings. Named ranges are handy because they keep working if the source rows move.
How to use IMPORTRANGE step by step
Step 1: Copy the source spreadsheet’s URL
Open the source spreadsheet in your browser. Click the address bar, select the whole address and copy it with Ctrl+C (Command+C on a Mac). While you are there, note the exact name of the tab at the bottom of the screen and the cells you need, for example A1 through E200.

Step 2: Click the top-left cell for the imported data
Open the destination spreadsheet and click the cell where the import should begin, usually A1 on an empty tab. IMPORTRANGE fills a block of cells to the right and below this one, the same size as the source range. Make sure that whole area is empty, or the formula cannot spill its results.
Step 3: Type the formula
Type =IMPORTRANGE(", paste the URL, then type ", " followed by the tab name and range and finish with "). For example:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbCdEfGh123/edit", "'Q3 Orders'!A1:E200")
Check that you have four double quotation marks, a comma between the two parts, and a closing parenthesis. Then press Enter.
Step 4: Click Allow access
If this is the first time these two files have been connected, the cell shows #REF! after a few seconds. That is expected. Hover over the cell, or click it, to see the message You need to connect these sheets, then click Allow access.
Before you click, know what it does: it lets anyone who can edit the destination file pull any data from the source file, not just the range in your formula. If the source contains sensitive tabs, read the permissions section first.

If you do not own the source file and do not have access, there is no Allow access button. Instead you will see a permission error. Open the source URL in your browser, request access, and wait for the owner to share it with you.
Step 5: Check the result
A green loading bar may appear briefly, and then the data fills the cells. Only the top-left cell contains the formula; the rest are results. Click any imported cell other than the first and the formula bar shows the value but not a formula. From now on, edits in the source range show up here automatically.

IMPORTRANGE brings in values only. Fonts, colors, column widths, number formats chosen in the source, comments and formulas do not come across. Format the destination cells yourself; your formatting stays in place when the data refreshes.
Worked example: a team dashboard from a sales file
Say your company keeps all orders in a spreadsheet called Regional Sales 2026. Its Q3 Orders tab looks like this:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Order ID | Date | Region | Rep | Amount |
| 2 | Q3-1001 | 7/2/2026 | East | Alex Rivera | 1,250 |
| 3 | Q3-1002 | 7/3/2026 | West | Jordan Lee | 860 |
| 4 | Q3-1003 | 7/5/2026 | East | Sam Patel | 2,400 |
| 5 | Q3-1004 | 7/8/2026 | Central | Casey Morgan | 540 |
| 6 | Q3-1005 | 7/9/2026 | East | Alex Rivera | 1,780 |
You manage the East team and want your own file, East Team Dashboard, that always shows current numbers without giving everyone edit access to the company file. Here is how the pieces fit together:
- Import everything once, on a helper tab. In a tab named Data, cell A1:
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbCdEfGh123/edit", "'Q3 Orders'!A1:E"). The rangeA1:Estarts at row 1 and runs to the last row, so new orders are included. - Allow access when prompted.
- Build the dashboard from the helper tab with ordinary formulas:
=SUMIF(Data!C:C, "East", Data!E:E)totals East sales (5,430 in the sample above), and=COUNTIF(Data!C:C, "East")counts East orders (3).
Importing once and pointing everything else at the helper tab means the file makes one request to the source instead of several, which is faster and easier to fix later. If you only need the East rows on screen, use QUERY or FILTER as shown next.
Import only some rows with QUERY or FILTER
IMPORTRANGE always returns the full range you name. To keep only certain rows or columns, wrap it in another function. Make the plain IMPORTRANGE connection first and click Allow access; a wrapped formula often just shows an error until the two files are connected.
QUERY and IMPORTRANGE
QUERY filters, sorts and picks columns using a short, SQL-like sentence. Because the imported data is an array rather than columns on a sheet, refer to columns as Col1, Col2, Col3 and so on, counted from the left edge of the imported range, not as A, B, C. Google’s QUERY documentation says both styles are accepted, but the Col style works in every case, including imported data, so it is the one to use here.
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbCdEfGh123/edit", "'Q3 Orders'!A1:E"), "select Col1, Col2, Col4, Col5 where Col3 = 'East' order by Col5 desc", 1)
This returns Order ID, Date, Rep and Amount for East orders only, largest first. The final 1 tells QUERY that the first row is a header. For the sample data, the result is:
| Order ID | Date | Rep | Amount |
|---|---|---|---|
| Q3-1003 | 7/5/2026 | Sam Patel | 2,400 |
| Q3-1005 | 7/9/2026 | Alex Rivera | 1,780 |
| Q3-1001 | 7/2/2026 | Alex Rivera | 1,250 |
A few QUERY clauses that pair well with IMPORTRANGE: where Col5 > 1000 for a number test, where Col4 contains 'Rivera' for partial text, limit 10 for the first ten matches, and select Col3, sum(Col5) group by Col3 for a total per region.
FILTER and IMPORTRANGE
FILTER keeps rows where a condition is TRUE. Each condition must be the same height as the data, so the condition also has to come from the imported range. The LET function lets you import once and reuse the result:
=LET(d, IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbCdEfGh123/edit", "'Q3 Orders'!A2:E"), FILTER(d, INDEX(d, 0, 3) = "East"))
Here d holds the imported rows (starting at row 2, so no header), and INDEX(d, 0, 3) is its third column, Region. FILTER returns #N/A when nothing matches, so you can wrap the whole thing in IFNA(..., "No orders"). The guide to filtering columns in Google Sheets explains FILTER conditions in more detail.
Which one to choose
- Use QUERY when you also want to sort, choose columns, rename headers or total by group in one formula.
- Use FILTER when the rule is simple and you want the header-free rows to feed other formulas.
- If you own the source, the fastest option is often to filter or total there and import only the small result. Google recommends condensing data in the source before importing it.
Other useful IMPORTRANGE combinations
Look up values in another file
Use IMPORTRANGE as the lookup range: =VLOOKUP("Q3-1004", IMPORTRANGE("URL", "'Q3 Orders'!A:E"), 5, FALSE) returns 540. Our VLOOKUP guide for Google Sheets covers the other arguments. If you need several lookups, import to a helper tab once and look up from there instead.
Total or count without showing the data
=SUM(IMPORTRANGE("URL", "'Q3 Orders'!E2:E")) returns the total of the Amount column without displaying any rows. COUNTA, AVERAGE and MAX work the same way.
Stack data from several files
To combine files with the same column layout, put the IMPORTRANGE formulas inside curly braces. In US-English Sheets, a semicolon stacks ranges on top of each other and a comma places them side by side:
={IMPORTRANGE("URL_East", "Orders!A2:E"); IMPORTRANGE("URL_West", "Orders!A2:E")}
Every range in a vertical stack must have the same number of columns. Connect each source file on its own first (a plain IMPORTRANGE in any cell, then Allow access), because the combined formula may not offer the prompt. You can then wrap the stack in QUERY, for example adding "where Col1 is not null" to drop blank rows.
Keep the URL in a cell
Both arguments can be cell references. Put the URL in B1 and the range in B2, then use =IMPORTRANGE(B1, B2). This is useful when the same source feeds many formulas. Avoid changing those cells often: Google notes that a frequently changing argument causes many external calls and can lead to throttling.
How IMPORTRANGE refreshes
IMPORTRANGE is not a one-time copy, but it is not instant either. According to Google’s documentation:
- An update to the source causes open destination files to refresh, and you may see a green loading bar.
- The function checks for updates every hour while the destination is open, even if nothing else changes.
- It reloads when a document is opened, and documents that have not been active recently can take a while to catch up.
- Reloading the browser page does not force a refresh. Deleting the formula and entering it again does. A quick way is to select the formula cell, press Ctrl+X, then Ctrl+V in the same cell.
- When files are chained (B imports A, C imports B), each layer adds delay. Avoid long chains and never let two files import from each other, which creates a loop that never returns data.
The File > Settings > Calculation options that make Sheets recalculate every minute or every hour apply to time-based functions such as NOW, not to the import schedule. See how recalculation settings work in Google Sheets for what that menu controls.
This is the part most guides skip, and it matters if the source file contains anything private.
- The connection is file to file, not range to range. After someone clicks Allow access, any editor of the destination spreadsheet can write an IMPORTRANGE formula that pulls from any tab or range of the source. Do not connect a file with private tabs to a destination that many people can edit.
- It lasts until the person who allowed it loses access. Google says the connection stays in effect until the user who granted it is removed from the source file. Deleting the formula does not by itself undo the link.
- It counts toward sharing limits. The access granted to a destination file counts against the source file’s 600-user share limit.
- Download restrictions block new imports. If the owner turns on the setting that disables download, print and copy options in the source’s sharing settings, new IMPORTRANGE formulas cannot pull data from it. Formulas set up before the setting was turned on keep working.
- Work and school accounts follow your admin’s sharing rules. If your organization blocks sharing with people outside it, you may not be able to open or import a file from another organization at all.
To share only part of a private file safely, create a separate spreadsheet that imports just the allowed range, and share that one instead. Live2Tech’s guide on sharing only one sheet in Google Sheets walks through that setup and its trade-offs.
Limits and performance tips
- 10 MB per request. Google caps each IMPORTRANGE request at 10 MB of received data. Very large ranges fail or load slowly.
- Import usage is counted against the file’s creator. When import functions create too much traffic, cells show Loading… with a message that loading may take a while because of the number of requests. The quota covers all import functions in all open files you created, and a collaborator’s edit can count against it.
- No volatile functions. An import cannot depend, directly or indirectly, on NOW, RAND or RANDBETWEEN. TODAY is the exception because it changes only once a day.
- Closed ranges are faster.
A1:E500is quicker thanA:E, because an open range makes Sheets check every row. Use an open range only when the source keeps growing. - Fewer formulas are faster. Import once to a helper tab and reference it, rather than repeating the same IMPORTRANGE in many cells.
- Static data does not need a live link. For history that never changes, copy it into the destination once and paste it as values. Our copy and paste guide for Google Sheets shows how to use Paste special to paste values only.
For bigger jobs, Google points to Apps Script, which can copy data on a schedule, and Connected Sheets, which is built for large data sets.
Troubleshooting IMPORTRANGE errors
#REF! with “You need to connect these sheets”
The files are not linked yet. Hover over or click the cell and choose Allow access. If no button appears, wait a few seconds after entering the formula, then click the cell again.
#REF! saying you don’t have permission
Your account cannot open the source. Paste the URL into your browser to check. If you are signed in to several Google accounts, make sure the one using Sheets is the one with access. Ask the owner to share the file, or request access from the page that opens. Also check that the source is a Google Sheets file, not an .xlsx file stored in Drive.
#REF! saying the array result would overwrite data
Something is already in the cells where the results need to go, even a space or a hidden value. Clear the cells below and to the right of the formula, or move the formula to an empty area. This also happens if you type over one of the imported cells; press Ctrl+Z or delete what you typed.
#ERROR! (formula parse error)
The formula is not written correctly. The usual causes are a missing double quote around the URL or range, curly “smart” quotes pasted from a document, a missing comma, or a missing parenthesis. Retype the quotes directly in Sheets.
#ERROR! mentioning NOW, RAND or RANDBETWEEN
The URL, range or source range depends on a volatile function. Copy those cells and use Edit > Paste special > Values only so the import references fixed values.
Wrong or empty data
Check the tab name for typos and extra spaces, and add single quotes if it contains spaces. If you left the tab name out, the formula is reading the first tab, which may not be the one you meant. If someone renamed the source tab, update the text in the formula; unlike normal references, a tab name inside quotes does not update itself.
Loading… that never finishes
The range may be too large, the file may contain many import formulas, or a chain of files may be slow to wake up. Shrink the range, replace repeated imports with a single helper tab, and make sure no two files import from each other.
QUERY returns a parse error
Use Col1, Col2 style references instead of column letters, put text values in single quotes inside the query, as in 'East', and confirm the column numbers match the imported range, not the source sheet’s letters.
How to undo an import
To turn imported data into a normal, editable copy, select the results, copy them, and paste them back with Paste special > Values only. The link is gone and you can edit the cells. To remove the import entirely, delete the formula in the top-left cell. To cut off access from the source side, the source owner can remove the person who clicked Allow access from the source file’s sharing list.
Frequently Asked Questions
How do I reference another tab in the same spreadsheet?
You don’t need IMPORTRANGE. Type an equals sign, then the tab name and cell, for example ='Q3 Orders'!E2, or a range such as ={'Q3 Orders'!A1:E20}. These references update instantly. Live2Tech’s guide to pulling data from another sheet in Google Sheets covers same-file options.
Does IMPORTRANGE update automatically?
Yes. Changes in the source appear in open destination files, and Google also checks for updates every hour while the destination is open. Expect a short delay rather than an instant change, especially across chained files.
Can I edit the imported data?
Not in place. Typing over an imported cell breaks the result with a #REF! error. Edit the source file instead, or paste the data as values to make a separate, editable copy.
Does IMPORTRANGE bring over formatting and formulas?
No. It imports the displayed values only. Format the destination cells yourself. If you need the same layout, copy the source tab into the destination with right-click on the tab and Copy to > Existing spreadsheet, clear its data, and put the IMPORTRANGE formula in A1.
Do I have to click Allow access every time?
No. You allow access once for each pair of files. Further formulas in the same destination that point to the same source work right away.
Can I import an entire spreadsheet?
Not in one formula. Each IMPORTRANGE reads one range from one tab. For several tabs, use one formula per tab, or stack them with curly braces if they share the same columns.
Does IMPORTRANGE work on the Google Sheets app for iPhone or Android?
Formulas that are already connected calculate when you open the file in the app. For a new connection, use Sheets in a computer browser so you can reach the Allow access prompt easily, then go back to the app.
Is there an IMPORTRANGE function in Excel?
No. IMPORTRANGE exists only in Google Sheets. Excel links to other workbooks with external references instead, and an IMPORTRANGE formula in a downloaded .xlsx file will not work.
Why does my IMPORTRANGE work for me but not for a coworker?
The coworker needs to be able to open the destination file, and the destination must be connected to the source. If the source owner removed the person who first allowed access, the connection may have ended. Have someone with access to both files enter a plain IMPORTRANGE and allow access again.
Next step
Start with a plain IMPORTRANGE on an empty helper tab, allow access, and confirm the data looks right. Once it works, build your summaries, QUERY views or lookups from that tab. For the official reference, including the latest notes on limits and refresh behavior, see Google’s IMPORTRANGE help page, along with its pages on the QUERY function and optimizing data references.

Kermit Matthews runs Live2Tech from just outside Philadelphia. He is an IT specialist with over 20 years of experience, from a university help desk to small-business IT, IT management and his own consulting practice, and has written tech guides full time since 2020. Steps are checked against the current software on a real device or the maker’s official documentation. More about Kermit.