Spill Error in Excel when using Table format.

Copper Contributor

Hi,

I keep getting the #Spill Error when using the dynamic Xlookup function.This only happens when I use the Table format i.e.does not happen when I change the Table to a Range.

I tried looking it up onGoogle but it clearly says "Spilled array formulas aren't supported in Excel tables. Try moving your formula out of the table, or converting the table to a range (click Table Design > Tools > Convert to range)"

Is there any work around to not get a Spill Error using the Table format ??

Thanks and Regards.

Aspi.

17 Replies

@akolah1966 

 

I use array formulas retrieving data from Excel Tables frequently (ever since gaining access to the Dynamic Array functions).

 

My experience with the SPILL error is that it occurs when some cell or cells are occupied with data and in the way of the results of the array function spilling out to its fllest extent.

 

Are you using the formula IN the table itself? I can imagine that wouldn't work; never occurred to me to try it. They're excellent when retrieving data FROM an Excel Table.

 

So maybe you could clarify exactly what you're doing and wanting to do....

 

I agree with @mathetes

For an array formula to work within a Table it must return only a single value; no spilling allowed.  In such situations it can be useful to have the Table replicate the formula down the column to produce equivalent calculations for each record.

 

For array formulas that return multiple results as a spilt array, then one must place the formula outside the table, ideally with an intervening blank column (which can be reduced in width).  As rows are added to the data table, the dynamic array formula will adjust accordingly if it involves a structured reference.

@akolah1966 

 

@Peter Bartholomew  wrote: As rows are added to the data table, the dynamic array formula will adjust accordingly if it involves a structured reference.

 

I just wanted to underscore the usefulness (the value) of that feature. It makes it easy to use a combination of an Excel Table, one or two Dynamic Arrays functions (notably UNIQUE, FILTER and SORT) to create Data Validation lists that are themselves dynamic and growing.

 

I've attached a simple example (created in response to another posting dealing with Data Validation, where the desire had been to create Data Validation lists where the second selection would change based on the first). This example uses a table containing first and last names; the user can select a first name (with data validation against a list of unique first names), followed by selection of last names only of those whose first name is the same as the first selection.   The sheet includes commentary on the formulas.

 

I use this kind of data validation structure in my personal budget and expense tracking spreadsheet, for expense categories and sub-categories. It allows me to add new sub-categories and major categories on an ad hoc basis.

 

It's also useful in generating summary reports, almost like your very own pivot table....

 

lots of applications.

@Peter Bartholomew Hi Peter, thank you for your response. I now understand that I will need to have a blank column after my Table and then use the dynamic validation to get the unspilled results.

Regards

Aspi

@mathetes Hi Mathetes, thank you very much for your response and for the example attached. That helps a lot to understand how eveything works.

Best Regards.

Aspi.

@mathetesHi Mathetes,  Do not understand how your Data Validation reply fixes the issue.

Used Filter function formula to create results in A2:A30.  Now highlighted A2:A30 to Insert Table and received #SPILL! in A2.

Issue:  How do I insert/create a table (Table1) for A2:A30?

           Table1 Refers To =Sheet1!$A$2:$A$30

 

Regards

@Cal_Grizzly 

If the question is how insert spill into the table or build table on the top of the spill - no way. One or another.

 

If the question is how to use spill in data validation - just A2#.

@Cal_Grizzly 

 

You wrote: 

Do not understand how your Data Validation reply fixes the issue.

Used Filter function formula to create results in A2:A30.  Now highlighted A2:A30 to Insert Table and received #SPILL! in A2.

Issue:  How do I insert/create a table (Table1) for A2:A30?

           Table1 Refers To =Sheet1!$A$2:$A$30

 

And I don't really understand your question, why you might've expected my Data Validation reply to be applicable to what you're seeking to do. It was a demonstration of something else that did help the original poster.

 

If the response from @Sergei Baklan has met your need, that's great.

 

If not, let me suggest that you start a new thread rather than building on this one from six months ago, and give a more complete description of what you are facing, if possible attaching a copy of your Excel file.

@mathetes 

Hi Mathetes,

Thank you for the reply.

Regarding, "why you might've expected my Data Validation reply to be applicable to what you're seeking to do."

 

akolah1966 mentioned: I keep getting the #Spill Error when using the dynamic Xlookup function. This only happens when I use the Table format i.e.does not happen when I change the Table to a Range.

 

I am using the dynamic FILTER function and also received the #Spill Error. If I convert the Filter results in A2:A30 to a range and then highlight A2:A30 to Insert Table, the table is created.

 

Regarding:

    If the question is how insert spill into the table or build table on the top of the spill - no way. One or another.


    If the question is how to use spill in data validation - just A2#.

 

No. Neither of those statements is my question.

 

The spill occurred when I (1) highlighted the dynamic Filter function results in A2:A30 then (2) try to create a table using the dynamic Filter function results in A2:A30 by clicking on Insert -> Table -> Create Table.

 

Here is what I did:

    1. Using dynamic Filter function I created a formula to create results in A2:A30.
    2. Highlighted A2:A30 to Insert Table (clicked on Insert -> Table -> Create Table).

 

Received #SPILL! Error in A2. Hence, want to create a table of the Filter results in A2:A30.

 

Hence, why I originally stated:

Issue: How do I insert/create a table (Table1) for A2:A30?

Table1 Refers To =Sheet1!$A$2:$A$30

Hi Sergei Baklan,

Thank you for the reply.

Regarding:

If the question is how insert spill into the table or build table on the top of the spill - no way. One or another.
If the question is how to use spill in data validation - just A2#.

No. Neither of those statements is my question.

My question was "How do I insert/create a table (Table1) for A2:A30? Table1 Refers To =Sheet1!$A$2:$A$30" No where in my question is "how insert spill" nor "how to use spill".

The spill occurred when I (1) highlighted the dynamic Filter function results in A2:A30 then (2) try to create a table using the dynamic Filter function results in A2:A30 by clicking on Insert -> Table -> Create Table.

Here is what I did:

1. Using dynamic Filter function I created a formula to create results in A2:A30.
2. Highlighted A2:A30 to Insert Table (clicked on Insert -> Table -> Create Table).

Received #SPILL! Error in A2. Hence, want to create a table of the Filter results in A2:A30.

Regards and thank you for your assistance.

@Cal_Grizzly 

===

If the question is how insert spill into the table or build table on the top of the spill - no way. One or another.
If the question is how to use spill in data validation - just A2#.

No. Neither of those statements is my question.

===

 

But that's exactly what you do. You use FILTER() function which returns the spill into the cells. After that you try to build the table based on the cells where the spill is already placed. As result you have #SPILL! error.

Sergei,
Regarding your reply statement, " You use FILTER() function which returns the spill into the cells." Where did I mention that the FILTER() function returned a #SPILL! into the cells?
Here is what I said I did:

1. Using dynamic Filter function I created a formula to create results in A2:A30.
Notice, I stated "create results in A2:A30" which means the FILTER() function DID NOT return a #SPILL! into the cells.

2. Highlighted Filter function results A2:A30 to Insert Table (clicked on Insert -> Table -> Create Table).
Note: NO WHERE in A2:A30 is #SPILL!.

Received #SPILL! Error in A2 AFTER I clicked on Insert -> Table -> Create Table. This #SPILL! is NOT from the Filter Function. The #SPILL! is from the attempt to create a table using the Filter Function results in A2:A30.

What do I want to do? Create a table containing the Filter results in A2:A30.

Thank you for your assistance.
Regards and thank you for your assistance.

@Cal_Grizzly 

That's misunderstanding. What dynamic array function returns is called spill. In your case FILTER() returns some values into A2:A30, entire object is spill. You may reference it as =A2# and you can't edit values within the spill, e.g. cell A10.

 

If function can't return spill into the grid, it shows #SPILL! error with some explanation why spill can't be returned - "the cell we need to spill data into isn't blank"

@Cal_Grizzly 

It doesn't matter in which order you do it: Tables and spill formulas do not work together. Hence the spill error.

Maybe this will change in the future.

 

Thank you for the clarification and your assistance.
Thank you for the reply.

Hopefully soon. :)

@akolah1966 

I see little benefit in hybridising list and array technologies (Table and Dynamic Arrays) but, if you are desperate to do that, you could look up terms of the dynamic array one by one to bring into the table.

= INDEX(filtered#, [@index])

The dynamic array can either be a helper range or could be recalculated in its entirety, once for every row of the table.