06-13-2020 05:04 PM
06-13-2020 05:04 PM
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.
06-13-2020 06:50 PM
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....
06-13-2020 11:59 PM
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.
06-14-2020 04:50 AM - edited 06-14-2020 04:52 AM
@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.