Level 3Pulling Data InReading, 4 min

IMPORTRANGE across files

Teams rarely keep everything in one file. Sales has a pipeline sheet, marketing a spend tracker, finance a budget. IMPORTRANGE pulls a live range from another spreadsheet:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbC.../edit", "Pipeline!A1:F500")

The first input is the other file's URL (or just its ID), in quotes. The second is the sheet name and range, also in quotes.

The first time, the cell shows #REF! with an Allow access button. Click it once and the connection stays. You need view access to the source file.

It earns its keep when you wrap it:

=QUERY(IMPORTRANGE(url, "Pipeline!A1:F500"), "select Col2, sum(Col6) where Col4 = 'Won' group by Col2")

Inside QUERY, imported data is named Col1, Col2 and so on, not by letter, because it no longer lives in this sheet's columns.

Habits that keep it fast and safe:

  • Import once, then reference. Put one IMPORTRANGE on a tab called Data and point everything else at that tab. Twenty IMPORTRANGEs to the same file slow the sheet down.
  • Import only what you need. A bounded range beats whole columns.
  • Access goes with the data. Anyone who can open your file can see what you imported, even if they can't open the source.