Use IMPORTRANGE to pull cells from another Google Sheets file. Enter the source URL and range, then click Allow access when Sheets asks you to connect the files.
The imported values stay linked to their source. This guide covers the first connection, single-column imports, totals, and filtering with QUERY, using one small sales table.
IMPORTRANGE function syntax in Google Sheets
=IMPORTRANGE(spreadsheet_url, range_string)
spreadsheet_urlidentifies the source file. Use a quoted URL, a spreadsheet key, or a cell containing the URL.range_stringidentifies the source tab and cells as text, such as"'Sales data'!A1:C5".
Put single quotes around a tab name containing spaces, inside the double-quoted range string. The tab name comes from the sheet tab, not the spreadsheet title.
For two tabs in the same spreadsheet, a normal reference such as ='Sales data'!A2 is usually enough. IMPORTRANGE connects separate spreadsheet files.
Connect the source and destination files
Start with a source tab named Sales data. Enter this sample table in A1:C5, or adapt the ranges to your own source data.
| Region | Product | Sales |
|---|---|---|
| East | Widget | 100 |
| West | Widget | 200 |
| East | Gadget | 150 |
| East | Widget | 120 |
- Open the source spreadsheet and copy its URL from the address bar. Confirm that you can view its data.
- Open the destination spreadsheet. Paste the source URL into H2.
- Choose an empty area with at least five rows and three columns. Enter the formula below in its upper-left cell.
- If the cell shows #REF!, select it and read the message. For “You need to connect these spreadsheets,” click Allow access.
=IMPORTRANGE(H2,"'Sales data'!A1:C5")

The first connection can require approval even when you own both files. Our test used two private files owned by the same account and still displayed the connection prompt.
Google explains this permission model in its IMPORTRANGE documentation. A narrow range string limits this import’s output; it does not create a separate source-file access restriction.
If Sheets says you lack permission, open the source URL and request access from its owner. Clicking Allow access cannot override a source file you are not allowed to read.
Import an entire range, including headers
This example imports A1:C5, so the result includes the header row and all four sales records. Enter the formula once; the result expands into adjacent cells.
=IMPORTRANGE(H2,"'Sales data'!A1:C5")

The imported table contains the sales values 100, 200, 150, and 120. It returns cell values, rather than reproducing the source’s formatting or copying its formulas as editable formulas.
If Sheets reports that it cannot find the range or sheet, check the tab spelling, apostrophes around spaced names, exclamation mark, and cell addresses. This differs from the first-connection permission error.
Edit the source when you want to change imported data. To make an independent snapshot, copy the results and use Edit > Paste special > Values only in another area.
Import a single column
Change the range string to bring over only the Sales column. Including row 1 keeps its heading.
=IMPORTRANGE(H2,"'Sales data'!C1:C5")
The result is one column: Sales, 100, 200, 150, and 120. Use C2:C5 instead when you want only the numbers.
A bounded range keeps the request focused. Increase its ending row as needed, or choose a sensible allowance for future records instead of importing unused columns.
Use the source URL or spreadsheet key directly
H2 keeps the formulas short, but a quoted URL works too. Replace the example URL below with your own source URL before using it.
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit","'Sales data'!A1:C5")
The spreadsheet key is the long text between /d/ and /edit. You can use just that key as the first argument.
=IMPORTRANGE("YOUR_SPREADSHEET_ID","'Sales data'!A1:C5")
The placeholders above are not working file IDs. The full URL, key, and H2-reference versions returned the same table in our live test with a real source file.
When referencing H2, omit quotation marks around the cell address. Writing "H2" passes the literal text H2 instead of the URL stored there.
Total imported numbers with SUM
Wrap IMPORTRANGE in SUM when you need one total instead of a visible imported table.
=SUM(IMPORTRANGE(H2,"'Sales data'!C2:C5"))
The four sales amounts add up to 570. The outer SUM receives the imported numeric values and reduces them to one result.
Set up a plain IMPORTRANGE first if a wrapped formula leaves the connection error difficult to resolve. Once the file pair is connected, use the wrapped version.
For several calculations on the same data, import the table once and reference its destination cells. This avoids repeating the same external request throughout your workbook.
Filter imported data with QUERY
Use QUERY around IMPORTRANGE to return only selected rows and columns. Here, we keep Widget sales and show Region and Sales.
=QUERY(IMPORTRANGE(H2,"'Sales data'!A1:C5"),"select Col1, Col3 where Col2 = 'Widget'",1)
| Region | Sales |
|---|---|
| East | 100 |
| West | 200 |
| East | 120 |
Col1,Col2, andCol3identify columns in the imported array.where Col2 = 'Widget'keeps records with that product.- The final
1tells QUERY that the imported range contains one header row.
QUERY filters the result after IMPORTRANGE retrieves its specified range. It does not reduce the amount requested from the source spreadsheet.
If a numeric column mixes numbers and text, QUERY may treat minority-type entries as null. Check the source data types when expected records or amounts disappear.
Understand refresh delays and import size
IMPORTRANGE is a linked import, but it is not an instant synchronization guarantee. Changes can take time to appear, especially when one destination becomes the source for another import.
Google documents a 10 MB limit per request. Import only the needed range, summarize large datasets in the source, and keep chains of connected workbooks short.
Avoid circular connections where file A imports from B and B imports from A. For a growing reporting workflow, choose a clear source and let reports read from it.
If the source access changes, the destination may stop importing. Recheck the source URL and permission message before rewriting an otherwise valid formula.
Other Google Sheets articles you may also like