#SPILL! Error With Excel VLOOKUP, INDEX MATCH and SUMIF Resolved
#SPILL! Error With Excel VLOOKUP, INDEX MATCH and SUMIF Resolved
The tutorial explains what may cause a #SPILL error in an INDEX MATCH, VLOOKUP, SUMIF and COUNTIF
formula and how you can efficiently resolve it.
It is sad enough when a brand-new feature refuses to work in your Excel. But even more frustrating is
when a good old thing stops working all of a sudden, and you are receiving an error for a formula that
worked perfectly for years.
The below examples show how to �x a few common formulas that got broken because implicit
intersection is no longer invisibly performed in Excel. If you have never heard this term before, I
encourage you to carefully read the #SPILL error tutorial to understand what is happening behind the
scenes.
As we can reasonably assume, the problem is in the �rst argument (the red reference above) that
forces the VLOOKUP function to look up all the values in column A, which is over a million cells (the
exact number is 1,048,576)! In the past, that was not a problem - Excel could only look up one value at
a time, so it discarded all but one value in the same row as the formula. This behavior is called implied
or implicit intersection.
With the introduction of dynamic arrays, all Excel functions got the ability to process and output
multiple values, even those that were not initially designed to work with arrays! So, each time
VLOOKUP receives an array of lookup values, it tries to handle them all. In case there isn't enough
1 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
To resolve an Excel VLOOKUP spill error, you can use one of the following methods.
The formula needs to be entered just in one cell and it will �ll as many cells as needed automatically.
The result is a spill range like this one:
Notes:
2 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
If you are getting a #SPILL error anyway, make sure the spill range is empty, so nothing gets in
the way.
This solution does not work within an Excel table because tables do not support dynamic arrays.
It is my preferred option as it is simplest to implement and works �awlessly in all Excel versions, from
within normal ranges and tables.
As with the previous example, you enter the formula in one cell and drag it down the column.
3 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
Whichever solution you choose, a #SPILL error should be gone and your VLOOKUP formula starts
working normally in Excel 365.
For example, here's the formula that �awlessly returns sales numbers in Excel 2019 and earlier
versions, but refuses to work in Excel 365:
The remedy is already known - reduce the number of lookup values by applying one of the following
techniques.
3. Enable implicit intersection - add the @ character before a column reference, so that Excel
4 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
The result of the 1st formula is a dynamic spilled array, which is a great thing that saves you the
trouble of copying the formula to other cells. The limitation is that dynamic arrays only work in a
range, not a table.
The 2nd and 3rd formulas return a single value, which a table can also accept. If your data is organized
as a regular range, drag the formula down to copy it to the below cells. In a table, the formula will
propagate automatically. In the latter case, you can also use a structured reference notation referring
to the column headers:
5 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
For this example, let's try to �nd a total of sales made by three vendors (A3:A5). In Excel 2019 and
lower versions, you could successfully use the below syntax. In Excel 365, you will be getting a #SPILL
error:
6 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
If you followed the previous examples closely, you know that the error can be resolved in three
di�erent ways:
1. Use a range for your criteria, not a whole column:=SUMIF(D:D, A3:A5, E:E)
2. De�ne a single cell for the criteria and copy the formula down:=SUMIF(D:D, A3, E:E)
3. Include the implicit intersection operator (@) to limit the column reference to one
cell:=SUMIF(D:D, @A:A, E:E)
In a similar fashion, you can get a count of sales for each person by using the COUNTIF function:
=COUNTIF(D:D, A3:A5)
Please remember that the 1st formula spills automatically into the below rows and can only be used
within a range, not a table.
The 2nd and 3rd formulas return a single value, so you enter them in the �rst cell and then copy down
the column as usual.
7 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
The correct way is either a range/cell reference like in the above examples, or text enclosed in
quotation marks:
To learn more about what is acceptable in criteria and what is not, the following guidelines might be
helpful: SUMIF criteria syntax.
8 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
With SUMIF, you �rst de�ne range, then criteria, then sum_range (optional).
In case of SUMIFS, the �rst argument should be the sum_range, and then range/criteria pairs.
In our example, criteria_range is D:D and sum_range is E:E. If you put one in place of the other, the
formula will throw a #SPILL error again:
Arrange the arguments in the correct order, and SUMIF will give you the desired result:
9 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...
That's how to resolve a #SPILL error with Excel INDEX MATCH, VLOOKUP, SUMIF and other functions. I
thank you for reading and hope to see you on our blog next week!
10 of 10 2/17/2025, 8:41 AM