Sheet Clinic

"Array result was not expanded" in Google Sheets: what's in the way

FILTER or ARRAYFORMULA shows #REF! because a cell under the formula is not empty, often a stray space. Clear the cells below the formula to fix it.

Sheet Clinic editorsPublished
E2=FILTER(A2:A, C2:C>40)

Before as you see it

ABCDE
1NameWeekHoursOver 40 hrs
2DanaNov 346#REF!
3MarcusNov 338
4LuisNov 341 
5AishaNov 332
6PriyaNov 344
7TomNov 340
8KenNov 339

What changed

  1. E4 cleared
  2. E2:E4 filled

After E3:E cleared

ABCDE
1NameWeekHoursOver 40 hrs
2DanaNov 346Dana
3MarcusNov 338Luis
4LuisNov 341Priya
5AishaNov 332
6PriyaNov 344
7TomNov 340
8KenNov 339
Figure 1. One formula, two states of column E. FILTER needs E2:E4 for three names, and E4 was not empty.

Cell E2 shows #REF!, and when you click it, Sheets adds a red note: Array result was not expanded because it would overwrite data in E4. The formula in E2 is =FILTER(A2:A, C2:C>40). The formula itself is fine. It asks for every name in column A whose hours in column C are over 40, and three people qualify: Dana, Luis and Priya.

The note is literal. A result that has more than one value needs a free cell for each value, starting at the formula and running down. Here that means E2:E4. Sheets found something in E4, refused to write over it, and put the error in the one cell it was allowed to use. Empty the cells the result needs and the list fills in: select everything below the formula in its column and press Delete (cut and paste any real data there, such as notes or a total, somewhere else first), or move the formula to a column with nothing under it. On this sheet that range is E3:E, and clearing it puts the three names in E2:E4, even though E4 already looked empty.

You do not have to hover to read the note. Selecting E2 brings it up (we used the Name box), and it appeared the same way when we opened the shared copy without signing in, where the sheet is view only. So you can read which cell is in the way even on a sheet someone else owns. A #REF! whose note reads Circular dependency detected is a separate problem, covered in the post on finding a circular dependency.

FILTER needs three free cells, and one of them holds a space

In the take-home copy, the blocker in E4 is a single space. A space draws nothing on screen, so E4 looks like every other empty cell in the column. In your own sheet, the cell address at the end of the note is the first place to look.

Google calls a result like this an array. Its page on using arrays in Google Sheets describes array results that spill over to the cells to the right and below. How far down a FILTER result reaches depends on the data, so a formula that worked yesterday can break today when one more row qualifies and the list grows into a cell someone typed in. Excel users know the same situation as a #SPILL! error.

The copy has a row that shows how close that is. Tom has exactly 40 hours in C7, and the condition is greater than 40, so he is left out. If his hours were 41, the list would be four names long and FILTER would need E2:E5, so anything sitting in E5 would bring the error back.

Google Sheets with E2 selected. The formula bar shows =FILTER(A2:A, C2:C>40), E2 shows #REF!, and the note reads: Array result was not expanded because it would overwrite data in E4.
Figure 2. The Broken tab. Selecting E2 is enough to show the note.

Clearing the cells below the formula without losing anything you need

Type E3:E in the Name box to the left of the formula bar, press Enter, then press Delete. For a formula in another cell, start the range one row below it and keep the same column letter. One keypress takes out a space, and it does the same to the two other invisible blockers shown further down, a lone apostrophe and a formula that returns an empty string. If something under the formula is real data, cut it and paste it somewhere else first, or move the formula instead. Notes and totals belong above the formula row or in another column, since every cell below an array formula is space the result may need later.

IFERROR does not hide this one. With a space in L4, =IFERROR(FILTER(A2:A, C2:C>40), "none") still showed #REF! in L2. We deleted that test before sharing the copy.

Checking a cell that looks empty with LEN and ISBLANK

Clicking E4 does not settle it, because the formula bar shows a lone space as an empty line. Two formulas in any spare cell tell you what is there:

  • =LEN('Broken (as you see it)'!E4) returned 1 in the copy. One character, the space.
  • =ISBLANK('Broken (as you see it)'!E4) returned FALSE. Sheets does not count the cell as blank.

Both checks sit in column J of the More blockers tab, next to four more for the cells in the next section. Of the two, ISBLANK is the one to trust. In the copy, LEN returned 0 for two cells that were still in the way.

If the sheet with the error is one you can only view, there is nowhere to type these checks. Use File, then Make a copy, and run them in your own copy.

To practice, open the Try it yourself tab. It is the broken version again, with the space still in E4. Run the ISBLANK check on it, clear E3:E, and Dana, Luis and Priya should appear in E2:E4, the same as on the Fixed tab.

A formula that returns "" and a lone apostrophe also block the array

The More blockers tab starts from the fixed list and adds two cells that also look empty.

E3 holds =IF(C3>40, C3, ""). Marcus worked 38 hours, so the IF returns an empty string and the cell shows nothing. FILTER in E2 goes back to #REF!, and this time the note names E3. =LEN(E3) returned 0, while =ISBLANK(E3) returned FALSE.

Column G has =ARRAYFORMULA(IF(C2:C8>40, "Over", "OK")) in G2. It returns Over or OK for each of the seven rows, so it needs G2:G8. Someone typed a lone apostrophe into G6. A leading apostrophe tells Sheets to keep whatever follows as text, and with nothing after it the cell displays nothing. =LEN(G6) returned 0 and =ISBLANK(G6) returned FALSE.

The More blockers tab with G2 selected. The formula bar shows =ARRAYFORMULA(IF(C2:C8>40, "Over", "OK")), G2 shows #REF!, and the note reads: Array result was not expanded because it would overwrite data in G6.
Figure 3. ARRAYFORMULA gets this note too. G6 looks empty and holds only an apostrophe.

Formulas that were copied down a column by hand block an ARRAYFORMULA placed above them in the same way. That case is worked through in ARRAYFORMULA down a whole column.

What FILTER returned on the Fixed tab on November 11

Input7 rows, hours in C2:C8
Formula=FILTER(A2:A, C2:C>40)
ExpectedDana, Luis, Priya
Sheets returnedDana, Luis, Priya Matches expected
Checked2026-11-11, free personal account

Take-home copy. Four tabs: Broken (as you see it), Fixed, Try it yourself, More blockers. It opens as a copy in your own Drive.

Copy the sheet