Fix an Excel 365 IF Formula #SPILL! Error
Question details
The user needs to resolve a #SPILL! error in an Excel IF formula that returns multiple results.

- Product
- Microsoft Excel 365 and Excel 2021
- Device & OS
- not provided
- Scenario
- An IF formula uses dynamic arrays to return results into neighboring cells.
- Observed behavior
- Excel displays #SPILL! when the intended output range is blocked or the array formula is inside an Excel Table.
Select the cell showing #SPILL! and review the warning message to identify the cause. Check whether the formula is meant to return multiple values and whether its cell is inside an Excel Table.
Clear the IF Formula's Spill Range
Use this solution when values, formulas, or merged cells prevent the results from spreading into neighboring cells.
Select the cell showing #SPILL!, click the warning icon, and review the reported cause. If available, choose Select Obstructing Cells.
Select any cells containing unwanted values or formulas in the outlined spill range and press Delete. Move any content you need to keep elsewhere first.
If the spill range contains merged cells, select them and choose Home > Merge & Center > Unmerge Cells.
Return to the formula cell and confirm that the results fill the available range. If the error remains, click the warning icon again to check for another cause.
Move the Dynamic Array Formula Outside the Excel Table
Use this solution when the IF formula is inside an Excel Table and needs to return multiple results.
Work with IF Formulas in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and continue working in WPS Spreadsheets; it does not repair errors in Microsoft Excel itself.

Frequently Asked Questions
Why does my IF formula show #SPILL!?
The formula may return multiple results, but its output range may contain data or merged cells. Select the formula cell and click the warning icon to see the reported cause.
Can a dynamic array formula spill inside an Excel Table?
No. Move the formula to an empty cell outside the table, or revise it to return a single value for each table row.
How do I find cells blocking a spill range?
Select the #SPILL! cell, click the warning icon, and choose Select Obstructing Cells if that option is available. Move or clear unwanted contents in those cells.
What if clearing cells does not fix #SPILL!?
Click the warning icon again and check its message. The range may still contain merged cells, the formula may be inside a table, or Excel may report a different spill-related cause.




