Excel #SPILL! error: A quick and easy fix
In this blog post we’ll talk about spill errors and describe how to fix them. We’ll also see how to prevent spill errors and manage them when they do happen. This blog post is beneficial for both beginners and experienced Excel users!
What is #SPILL error in Excel?
When a dynamic array formula generates more results than can fit in a single cell, this is known as a spill error in Excel.
Dynamic array formulas are designed to “spill” their results across adjacent cells as needed. A “spill error” occurs when the generated results exceed the available space.
Why #SPILL Error?
There can be multiple factors that leads to the occurrence of a spill error, as listed below:
- Merged Cells in Spill Range
- Non-Empty Spill Range
- #SPILL! Error within Excel Table
- Volatile or Unrecognized Array
- Oversized Spill Range
In this article, we’ll go over each problem in detail and offer practical answers. We’ll work through these challenges step by step, whether it’s formula inaccuracies or insufficient cell ranges. By the conclusion, you will be able to not only troubleshoot but also prevent spill issues. Let’s decipher the complexity and perfect the art of error-free Excel formulas.
Recognize the Error!
Before moving with the solution, it is necessary to first understand the sort of #SPILL error that is occurring. To pinpoint the exact issue, click on the warning icon and read the message on the first line.
Once we identify the cause of the error, we can easily resolve the problem.
1. Merged Cells in Spill Range
When we try to use a merged cell in a spill range, the error Spill Range has Merged Cell will appear. Spill ranges are used in several cells to display the results of an array formula. Simply, when cells are merged, they can’t be divided into multiple cells. This means they can’t be used in a spill range.
We have two options for correcting this error:
- Remove the cells from the spill range.
- Transfer the formula to a range that does not contain any merged cells.
Here’s an illustration of how to unmerge cells in a spill range:
- Select merged cell.
- Click Merge & Center in the Alignment group on the Home tab.
- Select Unmerge Cells from the drop-down arrow next to the Merge & Center button.
2. Non-Empty Spill Range
Spill Range isn’t blank error that occurs when we try to use an array formula in a range of cells that already contains data. As you can see in the below image, the spill already has “data”. We know that spill ranges are used in several cells to display the results of an array formula. If the spill range already contains data, the formula will be unable to spill into the cells, and the #SPILL! error will be displayed.
To fix this error, we can either:
- Delete the data from the spill range.
- Move the formula to an empty range of cells.
3. #SPILL! Error within Excel Table
Spill error occurs in excel table because excel tables do not support dynamic array formulas. This is due to the reason that Excel tables are static, but dynamic array formulas can vary the size of the result range. When we try to use a dynamic array formula into an Excel table, it displays a #SPILL! error in all rows.
To resolve this issue, convert the table to a normal range by following these steps:
- Click anywhere in the table to select it.
- On the Table Design tab, in the Tools group, click Convert to Range.
- In the Convert to Range dialog box, click Yes.
4. Spill Range is Unknown
The error Spill range is unknown appears when excel is unable to calculate the size of the spill range for an array formula. This can happen for a few reasons:
- By using volatile functions such as RAND or RANDBETWEEN. The functions will return different values each time they are calculated, so Excel cannot predict the size of the spill range.
- Combination of two or more dynamic array functions can confuse Excel’s spill prediction.
For example, by using the RANDBETWEEN function, whose output is constantly changing, the SEQUENCE function cannot predict how many values would be produced.
To fix #SPILL range issue we can use following methods:
- Use a formula without volatile functions or a combination of dynamic array functions.
- Use the OFFSET function to manually set the spill range.
5. Spill Range is Too Big
The spill range is too big error occurs when we use a formula that generates a spill range that goes beyond the boundaries of the worksheet. This happens because Excel can handle up to 1,048,576 rows (the limit in Excel) and 16,384 columns.
When applying a formula like =C:C*20%, the Spill range is too large error can occur. The formula is attempting to calculate 20% of the entire column “C” and spill the results into adjacent cells in this example. However, the size of spill ranges is limited in Excel.
We can resolve the oversized spill range issue by using these steps:
- Replace the dynamic C:C*20% range with a specific range C3:C15*20%.
- Replace the entire column with just one cell then drag the formula down using the fill handle.
- Use @ operator. this will only display the output in the cell with formula and extend by dragging down across rows as required.
- We can also use this formula within a table.
Here’s how to find and fix a #SPILL error in Excel. It’s simple to troubleshoot and return your calculations to normal. Simply discover the cause of the mistake and use alternatives such as setting specified ranges or utilizing the @ operator. Excel provides tools to handle common issues, enhancing your spreadsheet skills and boosting productivity.