Google Sheets IMPORTRANGE Builder
Quick answer: Paste the source spreadsheet link below, set the tab and range, and copy the generated formula — e.g. =IMPORTRANGE("1AbC...", "Sheet1!A1:D"). After you paste it, click the cell and press Allow access once to connect the two files.
IMPORTRANGE pulls a range from one Google Sheet into another, but two things trip people up every time: digging the long spreadsheet key out of the URL, and getting the quotes and the Sheet!Range part exactly right. This builder does both — paste the whole link of the sheet you want to pull data from and it extracts the key, then writes a ready-to-paste formula.
Build your IMPORTRANGE formula
Paste the source spreadsheet link (the one you want to pull data from) — the builder pulls out its key and writes the formula.
=IMPORTRANGE("spreadsheet_url_or_key", "Sheet1!A1:D")
How this IMPORTRANGE builder works
IMPORTRANGE takes two text arguments: the spreadsheet key (or its full URL) and a range string in the form "Sheet1!A1:D". The key is the long token in the source link between /d/ and the next slash — for docs.google.com/spreadsheets/d/1AbCdEf123/edit#gid=0 the key is 1AbCdEf123. Google Sheets accepts either the key or the whole URL as the first argument, but the key is cleaner and this builder pulls it out for you.
The range string must be one piece of text in quotes, with the tab name and the A1 range joined by an exclamation mark: "Sheet1!A1:D". If your tab name has a space (like Raw Data) it has to be wrapped in single quotes inside the string: "'Raw Data'!A1:D" — the builder adds those automatically. Leaving the row numbers open, as in A1:D or A:A, imports the whole column as it grows.
The first time an IMPORTRANGE formula points at a new source file, the cell shows a #REF! error with an Allow access button. Click it once per pair of spreadsheets to authorise the link; after that the data flows automatically.
Common ready-to-paste examples
Import columns A to D from Sheet1 of another file:
=IMPORTRANGE("1AbCdEf123", "Sheet1!A1:D")
Import an entire column A (grows automatically):
=IMPORTRANGE("1AbCdEf123", "Sheet1!A:A")
Tab name has a space — wrap it in single quotes:
=IMPORTRANGE("1AbCdEf123", "'Raw Data'!A1:D")
Import, then filter to only rows where column B is "Open":
=QUERY(IMPORTRANGE("1AbCdEf123", "Sheet1!A1:D"), "select * where Col2 = 'Open'")
Paste the whole URL as the first argument (also valid):
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1AbCdEf123/edit", "Sheet1!A1:D")
FAQ
Where do I find the spreadsheet key for IMPORTRANGE?
It is the long token in the source spreadsheet's URL, between /d/ and the next slash: docs.google.com/spreadsheets/d/KEY/edit. You can paste either that key or the whole link into IMPORTRANGE's first argument — this builder extracts the key from the link for you so you don't have to.
Why does IMPORTRANGE show #REF! with an "Allow access" button?
That is normal the first time a formula connects two different spreadsheets. Click the cell, then click Allow access once to authorise the link between the source and destination files. After that the data imports automatically and you won't be asked again for that pair.
How do I use IMPORTRANGE when the tab name has a space?
Wrap the tab name in single quotes inside the range string, like "'Raw Data'!A1:D". The whole range argument stays inside double quotes; only the sheet name needs the extra single quotes. This builder adds them automatically when it detects a space.
Can I filter or sort the imported data?
Yes — wrap IMPORTRANGE inside another function. For example =QUERY(IMPORTRANGE(key, "Sheet1!A1:D"), "select * where Col2 = 'Open'") imports and filters in one go, and SORT() or FILTER() work the same way. Build the IMPORTRANGE part here first, then nest it.
Does IMPORTRANGE update automatically?
Yes. Once access is granted, the destination sheet refreshes from the source roughly every hour, and sooner when the source changes while someone has it open. You do not need to re-run the formula.