Fix a #SPILL! error in Excel
Identify whether a dynamic-array result is blocked by occupied cells, an Excel Table or merged cells, then clear the specific obstruction.
Download the example workbook (.xlsx)
Illustrative data. English function names and comma argument separators are shown; Excel may use different separators or translated function names. The file was structurally inspected, but native Excel calculation and UI behavior need local verification.
Three causes, three repairs
Use =SEQUENCE(3) as the common test. In an empty area it should fill three rows with 1, 2 and 3.
- Occupied cell: H3 already contains STOP; replace the instruction text in H2 with the formula. Excel should display
#SPILL!in H2. Select H2 to inspect the dashed spill border; clear H3 and expect H2:H4 = 1, 2, 3. - Inside an Excel Table: enter the formula in blank C9 of the included Excel Table. Spilled array formulas are unsupported inside tables. Move the formula outside the table and provide three empty rows.
- Merged cell: J3:J4 are already merged; replace the instruction text in J2 with the formula. Unmerge the target area or move the formula to empty unmerged cells.
The download includes an occupied cell, a real Excel Table and a merged blocker. Enter the SEQUENCE formulas in H2, C9 and J2 to reproduce each case; H2 and J2 start as instructions while C9 is blank, so no error is prefilled. Use the described blockers to reproduce each error in Excel; formula engines can calculate the array differently, so an OOXML preview is not evidence that Excel has shown a #SPILL! dialog. Keep the original range intact until you identify the blocking cell. For a no-match FILTER result, see the FILTER example; that is a different error condition.
Compatibility and source
Compatibility: Excel for Microsoft 365, Excel 2021 and Excel 2024 on desktop or web where the named function is supported. XLOOKUP is unavailable in Excel 2016 and Excel 2019. Dynamic-array results need an Excel version that supports spilling. Menu labels and available validation controls vary by desktop and web edition.
Formula and UI behavior are described in Microsoft’s Excel guidance. Start with the broad formula and shortcut reference or browse more Excel tips.