Webhard
IMPORTRANGE()
Imports a range of cells from a specified spreadsheet.
Syntax
fx
=IMPORTRANGE(spreadsheet_url, range_string)
Example
fx
=IMPORTRANGE("https://...", "Sheet1!A:D")
Paste this into Google Sheets to run it. The live playground on this site covers 24 of the 61 functions, and IMPORTRANGE isn't one of them yet.
Common pitfalls
- First call requires manually granting access via the in-sheet permission prompt. Won't work silently in scripts.
- Slow and rate-limited: cache results in a static range when possible rather than re-importing on every recalc.
- Range string must be quoted:
"Sheet1!A:D". Sheet name with spaces needs single quotes inside:"'My Sheet'!A:D".
Related formulas
Used by