First call: the cell shows #REF! with an "Allow access" button. After clicking, the other file's data appears.
Step
Cell content
Before access
#REF!
After access
Range Sales!A1:D imported
3. ARRAYFORMULA: one formula for the whole column
Instead of dragging a formula down 5,000 rows, write it once. New rows are calculated automatically, which prevents the classic "formula missing on the last rows" error.
=ARRAYFORMULA(IF(B2:B="", , B2:B * C2:C))
On a sheet where B = quantity and C = unit price, a single formula in D2 fills the whole column:
B: Qty
C: Price
D: Result
3
12
36
5
8
40
(blank)
4–6. FILTER, UNIQUE and SORT
FILTER(A2:D, D2:D > 1000) returns matching rows live; UNIQUE(B2:B) builds a clean list; SORT(range, column, FALSE) orders it. Combined, they replace most manual filtering.
=SORT(UNIQUE(FILTER(B2:B, C2:C="Paid"))) on the sample sheet:
Clients who paid
Acme
Borealis
Cobalt
7–8. SPLIT and REGEXEXTRACT for text
SPLIT(A2, " ") separates first and last names. REGEXEXTRACT(A2, "[\w.]+@[\w.]+") pulls an email out of a free-text cell — handy after copying data from emails or forms.
9–10. IFERROR and GOOGLEFINANCE
Wrap fragile formulas in IFERROR(formula, "") to keep dashboards clean, and use GOOGLEFINANCE("CURRENCY:EURUSD") for an up-to-date exchange rate in quotes and invoices. Remember that Google Sheets uses commas or semicolons as separators depending on the spreadsheet locale (File > Settings).
Common errors and how to fix them
#VALUE! Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: Client
Cause: QUERY does not accept header names, only column letters.
Fix: Write select B instead of select Client. With an IMPORTRANGE range, use Col1, Col2…
#REF! You need to connect these sheets.
Cause: IMPORTRANGE is used for the first time between these two files.
Fix: Hover the cell and click "Allow access". You also need at least view access to the source file.
#REF! Array result was not expanded because it would overwrite data in B5.
Cause: An array formula (FILTER, ARRAYFORMULA, QUERY) spills onto a cell that already holds data.
Fix: Clear B5 and the cells below, or move the formula to an empty area.
Formula parse error.
Cause: The separator does not match the file locale: a French-locale file expects ; instead of ,.
Fix: Check File > Settings > Locale and adapt the formula's separators.
FAQ
Do these formulas work in Excel?
FILTER, UNIQUE, SORT and IFERROR exist in Excel 365. QUERY, IMPORTRANGE, GOOGLEFINANCE and ARRAYFORMULA are specific to Google Sheets.
Does IMPORTRANGE update automatically?
Yes, the data is refreshed regularly while the file is open, with a short delay. It is not instant.
How do I filter QUERY on a date?
Use the date keyword and the yyyy-mm-dd format: where A >= date '2025-03-01'.
Every formula, query and script in this guide was run on a real sample file (Excel 365, Google Sheets, PostgreSQL, MySQL or Python 3) before publication. We document the edge cases we hit during testing, such as text-formatted numbers, empty months or NULL values. AI helps us draft and translate; a human checks each example and updates the guide when software versions change. Spotted an error? Write to contact@formulai-app.com.