Why UNIQUE and GROUPBY Functions Do Not Work Inside Excel Tables
Question details
The user needs to understand why dynamic-array functions fail to calculate properly when placed inside an Excel Table and how to resolve the issue.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Using dynamic-array formulas within formatted Excel Tables to group or extract unique data.
- Observed behavior
- The formula fails or returns an error because dynamic-array functions attempt to return multiple rows or columns, whereas a table calculated column strictly requires exactly one value per row.
Before modifying your formulas, ensure your spreadsheet calculates automatically and check if the target data range is formatted as a formal Excel Table (indicated by the presence of the Table Design tab).
Place the Dynamic-Array Formula Outside the Table
The best approach is to keep your source data in an Excel Table but perform the dynamic array calculations in adjacent normal cells.
Because table calculated columns mandate a single value per row, dynamic-array functions that spill over multiple cells are prohibited. By placing them outside the table boundaries, you retain the table's structural benefits for data entry while allowing the array to spill freely.
Click on a blank cell that has enough empty adjacent cells below and to the right to accommodate the spilled results.
Type your UNIQUE or GROUPBY formula, referencing the table columns (for example, =UNIQUE(Table1[Category])).
Press Enter. The results will dynamically spill into the neighboring cells without triggering an error.

Convert the Excel Table to a Normal Range
If you must have the dynamic-array formula in the exact location currently occupied by the table, you need to remove the table formatting.
Master Dynamic Arrays with WPS Spreadsheet
WPS Office Spreadsheet fully supports dynamic-array functions like UNIQUE to easily extract distinct values and analyze data effortlessly. You can seamlessly work with spilled arrays outside your data ranges.
- 1. Open your dataset in WPS: Launch WPS Spreadsheet and open your existing .xlsx file containing the data.
- 2. Select an output cell: Click an empty cell outside your main data table where the results can expand.
- 3. Use the UNIQUE function: Type =UNIQUE(A2:A100) to quickly extract all unique entries from the specified range.
- 4. Analyze your results: Press Enter to see the unique values spill dynamically. As your source data changes, WPS Spreadsheet updates the spilled array instantly.

Frequently Asked Questions
What does the #SPILL! error mean in Excel?
The #SPILL! error occurs when a dynamic-array formula, such as UNIQUE or SORT, tries to output results across multiple cells, but one or more of the target cells are not empty or the formula is located inside an Excel Table.
Can I use VLOOKUP or XLOOKUP inside an Excel Table?
Yes. Because VLOOKUP and a standard XLOOKUP formula typically return exactly one value per row, they work perfectly as calculated columns within an Excel Table.
How do I reference spilled array results in another formula?
You can reference the entire spilled array by adding a hash symbol (#) after the cell reference of the top-left cell in the array (for example, =SUM(D2#)).
Are dynamic array functions available in older versions of Excel?
No, dynamic-array functions like UNIQUE, GROUPBY, FILTER, and SEQUENCE are only available in Microsoft 365 and Excel 2021 or later. Older versions will not recognize these functions.




