Skip to content
Google Sheets

IMPORTRANGE function in Google Sheets

Imports a range of cells from a specified spreadsheet.

=IMPORTRANGE(spreadsheet_url, range_string)

IMPORTRANGE syntax and parameters

Two arguments, two required.

  • spreadsheet_urlstringRequired

    The URL of the spreadsheet from where data will be imported. The value for spreadsheet_url must either be enclosed in quotation marks or be a reference to a cell containing the URL of a spreadsheet.

  • range_stringstringRequired

    A string, of the format "[sheet_name!]range" (e.g. "Sheet1!A2:B6" or "A2:B6") specifying the range to import. The sheet_name component of range_string is optional; by default IMPORTRANGE will import from the given range of the first sheet. The value for range_string must either be enclosed in quotation marks or be a reference to a cell containing the appropriate text.

IMPORTRANGE examples

Formulas you'll actually reuse.

  1. A live copy of another spreadsheet's Orders range (click Allow access the first time):

    =IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbC…/edit", "Orders!A1:E200")
  2. Aggregate the imported data without copying it in:

    =QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbC…/edit", "Orders!A1:E200"), "select Col1, sum(Col4) group by Col1")

IMPORTRANGE in Excel

No direct equivalent — here's the way around.

Try IMPORTRANGE in the playground

Edit the example — nothing to install.

Preloaded with the IMPORTRANGE formula from Example 1 — change anything and watch it respond.

Loading the editor…

IMPORTRANGE errors

What they mean — and the fixes.

  • #REF!

    Access isn't granted yet or the sheet name is wrong — hover the cell and click Allow access, and quote the range as "Sheet name!A1:B2".