The #REF! error stating “Result was not automatically expanded” occurs when a dynamic array formula tries to populate a range of cells, but one or more cells in that exact path already contain data. To fix it immediately:
Plaintext
1. Hover your cursor directly over the cell displaying the #REF! error.
2. Read the tooltip box. It will explicitly name the blocking cell (e.g., "clear data in D5").
3. Navigate to that exact cell (D5), highlight it, and press the Delete key.
The Syntax Breakdown
#REF!: The primary error code. While traditionally used to indicate a broken or deleted cell reference, Google Sheets repurposes it for dynamic array functions to flag a spatial conflict.- Array Formulas: Functions like
FILTER,QUERY,IMPORTRANGE,SPLIT, orARRAYFORMULA. These calculate once in a single cell but distribute their outputs across multiple adjacent rows and columns. - Spill Range: The contiguous block of empty grid space required for the array to render its full output.
- Blocking Data: Any manual data living inside the required spill range. Google Sheets operates on a strict non-destructive protocol; it will never overwrite existing cell data. If even a single invisible space character blocks the path, the entire array collapses into the
#REF!error.
Real-World Example: Consolidating Monthly Marketing Leads
You are an Operations Manager building a clean reporting dashboard. You want to extract only the “Qualified” leads from your raw CRM export into a new, clean table using the FILTER function.
Here is your raw data table (A1:C5):
| Row | A (Company) | B (Contact) | C (Lead Status) |
| 1 | TechCorp | Sarah J. | Qualified |
| 2 | GlobalData | Mark T. | Unqualified |
| 3 | InnoSystems | Chloe K. | Qualified |
| 4 | AlphaLogix | David C. | Pending |
The Application:
In cell E1, you write your formula to pull the Qualified leads:
Excel
=FILTER(A1:C4, C1:C4="Qualified")
The Output (Error State):
Cell E1 returns #REF!. You hover over E1 and the tooltip reads: Error: Result was not automatically expanded, please insert more rows (or clear data in E3). Earlier that day, someone accidentally pressed the spacebar in cell E3. Because E3 falls within the necessary 3-row, 3-column spill range required to output the “TechCorp” and “InnoSystems” rows, the formula halts.
The Fix:
You click cell E3, hit the Delete key, and the data instantly populates:
| E (Company) | F (Contact) | G (Lead Status) |
| TechCorp | Sarah J. | Qualified |
| InnoSystems | Chloe K. | Qualified |
Common Errors & How to Fix Them
- You deleted the visible text, but the error remains: The blocking cell contains an invisible space, a hidden apostrophe (
'), or leftover custom formatting. Fix: Highlight the entire expected spill range (e.g., a massive 10×10 block below your formula) and press your keyboard’s Delete key to purge all invisible characters at once. - The tooltip says “please insert more rows” with no specific cell mentioned: Your array formula is attempting to output more rows of data than physically exist at the bottom of your spreadsheet. Fix: Scroll to the absolute bottom of your Google Sheet, find the “Add more rows at bottom” input box, type
1000, and click Add. - The error appears sporadically on a shared team document: Another user is occasionally typing manual notes or data into the blank space your formula relies on. Fix: Once your formula is working, highlight its entire output range, right-click, select View more cell actions > Protect range, and restrict edit access to just yourself.