How to Fix #SPILL! Error in Excel

Excel is renowned for its powerful array formulas that can perform calculations on multiple cells simultaneously. However, working with dynamic array formulas can sometimes lead to errors, and one such error is the #SPILL! error. This error occurs when the result of an array formula spills over adjacent cells, causing a disruption in the expected output. In this article, I will delve into the causes of the #SPILL! error in Excel, its implications, and practical strategies to troubleshoot and resolve it effectively.

What is the #SPILL! Error in Excel?

The #SPILL! error is an indication that an array formula has exceeded the boundaries of the target range and spilled over into adjacent cells. It occurs when the array formula attempts to return multiple values but encounters obstacles due to occupied cells in the output range. The #SPILL! error notifies users that the formula result cannot fit within the designated range.

Causes of the #SPILL! Error in Excel

The #SPILL! error in Excel can occur due to several reasons. Let’s discuss them one by one.

1. Occupied Output Range: If the output range of an array formula contains pre-existing data or formulas, Excel cannot spill the results without overwriting the existing contents. This situation triggers the #SPILL! error.

Occupied Output Range Causing #SPILL! Error

2. Indeterminate Size of Spilled Array: Sometimes Excel can’t determine the size of the spilled array. This is because the size of the spilled array changes every time the formula is executed. This situation triggers the #SPILL! error in Excel.

Indeterminate Size of Spilled Array Triggers #SPILL! Error

3. Output Array Spill Beyond the Edge of the Worksheet: Sometimes the size of the output array may spill beyond the edge of the worksheet, causing the #SPILL! error in Excel.

Output Array Spills Beyond the Edge of the Worksheet

4. Spill into the Merged Cells: Dynamic array formula can’t spill over the merged cells. If an array formula finds a merged cell along its output range, it will trigger the #SPILL! error.

Array Formula Can't Spill Over the Merged Cells

Troubleshooting and Resolving the #SPILL! Error in Excel

To overcome the #SPILL! error and ensure the smooth functioning of array formulas in Excel, consider the following troubleshooting techniques:

1. Clear Output Range: Before entering an array formula, ensure that the output range is clear of any existing data or formulas. If necessary, select and clear the cells in the output range to make space for the array formula results.

Clear Output Range to Avoid #SPILL! Error in Excel

2. Keep Output Array within the Edge of the Worksheet: Modify your formula, so that the output array stays within the edge of your worksheet. This will help you avoid the #SPILL! error in Excel.

Keep Output Array within the Edge of the Worksheet

3. Unmerge Cells to Avoid #SPILL! Error: Check out your output range. If you find any merged cells along the output range of the array formula, unmerge the cells before executing the array formula. This won’t trigger the #SPILL! error in Excel.


The #SPILL! error in Excel occurs when an array formula spills over adjacent cells, causing disruptions in the output range. By understanding the causes behind this error and implementing effective troubleshooting techniques, you can resolve it efficiently. With attention to detail and a systematic approach, you can harness the full power of array formulas while minimizing the impact of the #SPILL! error.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *