Formula Errors

Fix an Excel 365 IF Formula #SPILL! Error

Nimra MalikNimra Malik Dec 2, 2026 869 views

Question details

The user needs to resolve a #SPILL! error in an Excel IF formula that returns multiple results.

Fix an Excel 365 IF Formula #SPILL! Error
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.
Before you start

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.

Solution 1Recommended

Clear the IF Formula's Spill Range

Use this solution when values, formulas, or merged cells prevent the results from spreading into neighboring cells.

1
Inspect the error

Select the cell showing #SPILL!, click the warning icon, and review the reported cause. If available, choose Select Obstructing Cells.

2
Clear blocking 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.

3
Unmerge cells

If the spill range contains merged cells, select them and choose Home > Merge & Center > Unmerge Cells.

4
Check the result

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.

Free Microsoft Office alternative

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.

Create and edit spreadsheets with IF formulasCompatible with Microsoft Excel XLS and XLSX filesFamiliar interface for an easier move from Microsoft OfficeFree and lightweight for everyday spreadsheet work
microsoft office alternative - wps office

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.