0% found this document useful (0 votes)
11 views10 pages

#SPILL! Error With Excel VLOOKUP, INDEX MATCH and SUMIF Resolved

The document provides a tutorial on how to fix the #SPILL! error in Excel formulas such as VLOOKUP, INDEX MATCH, and SUMIF. It explains the causes of the error, primarily related to the introduction of dynamic arrays in Excel 365, and offers various solutions to resolve it. The tutorial includes specific examples and methods to adjust formulas to prevent the #SPILL error from occurring.

Uploaded by

s.saneep4678
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views10 pages

#SPILL! Error With Excel VLOOKUP, INDEX MATCH and SUMIF Resolved

The document provides a tutorial on how to fix the #SPILL! error in Excel formulas such as VLOOKUP, INDEX MATCH, and SUMIF. It explains the causes of the error, primarily related to the introduction of dynamic arrays in Excel 365, and offers various solutions to resolve it. The tutorial includes specific examples and methods to adjust formulas to prevent the #SPILL error from occurring.

Uploaded by

s.saneep4678
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...

How to �x #SPILL! error with Excel VLOOKUP,


INDEX MATCH and SUMIF
by Svetlana Cheusheva, updated on March 13, 2023

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.

#SPILL error with VLOOKUP

#SPILL error with INDEX MATCH

#SPILL error with SUMIF and COUNTIF

#SPILL error with Excel VLOOKUP formula


Here is a standard VLOOKUP formula that works �ne in pre-dynamic Excel (2019 and earlier), and
triggers in a #SPILL error in Excel 365:

=VLOOKUP(A:A, D:E, 2, FALSE)

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-...

space to output all the results, you see a #SPILL error.

To resolve an Excel VLOOKUP spill error, you can use one of the following methods.

Look up range rather than column


As we only have 3 lookup values, we limit the lookup_value argument to three cells:

=VLOOKUP(A3:A5, D:E, 2, FALSE)

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.

Look up a single value


Write a formula for the �rst lookup value and copy it down through as many cells as needed:

=VLOOKUP(A3, D:E, 2, FALSE)

It is my preferred option as it is simplest to implement and works �awlessly in all Excel versions, from
within normal ranges and tables.

Enforce implicit intersection


To limit an array to one lookup value, place the intersection operator @ before the column reference:

=VLOOKUP(@A:A, D:E, 2, FALSE)

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.

#SPILL error with Excel INDEX MATCH formula


In case you are using the combination of INDEX and MATCH functions to pull matches, a #SPILL error
can arise for the same reason - there is insu�cient white space for the spilled array.

For example, here's the formula that �awlessly returns sales numbers in Excel 2019 and earlier
versions, but refuses to work in Excel 365:

=INDEX(E:E, MATCH(A:A, D:E, 0))

The remedy is already known - reduce the number of lookup values by applying one of the following
techniques.

1. Look up a range, not a column:=INDEX(E:E, MATCH(A3:A5, D:D, 0))

2. Look up a single value:=INDEX(E:E, MATCH(A3, D:D, 0))

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-...

processes only one value:=INDEX(E:E, MATCH(@A:A, D:D, 0))

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:

=INDEX(E:E, MATCH([@[Seller ]], D:D, 0))

The below screenshots demonstrate the 3rd formula in action:

5 of 10 2/17/2025, 8:41 AM
Firefox https://www.ablebits.com/office-addins-blog/spill-error-excel-vlookup-...

#SPILL error with Excel SUMIF and COUNTIF formula


When a SUMIF, COUNTIF, SUMIFS or COUNTIFS formula returns a #SPILL error, it might be caused by
many di�erent factors. The most often ones are discussed below.

Spill range is too big


A very typical cause is supplying a whole column for criteria. Yep, that used to work in older Excel
versions, but not anymore, since the new spilling feature produces nearly 1.05 million results and
there is not enough space to accommodate them all!

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:

=SUMIF(D:D, A:A, E:E)

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)

=COUNTIF (D:D, A3)

=COUNTIF (D:D, @A:A)

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-...

Criteria expressed incorrectly


The SUMIF and COUNTIF criteria are also a common source of problems. Sometimes, people overthink
it and write the criteria as D3="carter" or D3:D11="carter" or D:D="carter". All three expressions are
wrong and cause a formula to produce zero or a #SPILL error!

The correct way is either a range/cell reference like in the above examples, or text enclosed in
quotation marks:

=SUMIF(D:D, "carter", E:E)

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-...

Wrong order of arguments


In singular and plural versions of the SUMIF function, the order of arguments is di�erent:

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.

If you muddle things up, a #SPILL error occurs.

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:

=SUMIFS(D:D, A3:A5, E:E)

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-...

=SUMIFS(E:E, D:D, A3:A5)

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

You might also like