Google Sheets functions / Web
Web function · Google Sheets
IMPORTRANGE function
IMPORTRANGE pulls a block of cells from another Google spreadsheet and keeps it updated.
Syntax
=IMPORTRANGE(spreadsheet_url, range_string)On Excel: use Power Query. Connect to the other workbook through Get Data.
Arguments
| Argument | Required | Meaning |
|---|---|---|
| spreadsheet_url | Yes | The link to the source spreadsheet, in quotes. |
| range_string | Yes | The sheet and range, such as "Sales!A1:C100". |
Worked example
| A | |
|---|---|
| 1 | Result |
| 2 | Imported rows appear here |
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/YOUR_FILE_ID","Sales!A1:C100")Result: The source rows, after you allow access
The first use shows #REF! with an Allow access button. After approval the data appears.
Try it
This function needs a real Google spreadsheet and your permission.
Availability
| Platform | Status |
|---|---|
| Excel | Not available. Use Power Query or linked workbooks. |
| Google Sheets | Available. |
Common mistakes
- A destination range with existing content blocks the result.
- Many imports in one file can slow it down.
- Viewers can see the imported data, so check sharing first.
Do it with AI
Paste this prompt into Copilot, Gemini or another assistant. Check the result on a small sample first.
Combine IMPORTRANGE with QUERY so I pull only rows from Sales!A:D where column C is "Paid".