Fix an Excel #SPILL Error in a Table Using XLOOKUP
Question details
Return the matching local administrator from another table without spilling an entire column into an Excel table.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A calculated table column needs to find an administrator for the current facility where WOAR equals 1.
- Observed behavior
- The formula returns the entire Local Administrator column and produces a #SPILL error inside the table.
Check the table and column names on the Table Design tab, and confirm that your Excel version supports XLOOKUP. The examples assume the source table is named TableB and its WOAR values are numeric.
Return one matching administrator with XLOOKUP
Replace the whole-column result with a lookup that returns a single value for the current row.
Click the cell in the destination table that currently contains the #SPILL formula.
In the formula bar, enter =XLOOKUP([@Facility]&1,TableB[Facility]&TableB[WOAR],TableB[Local Administrator],"") and press Enter.
If your fields use different names, replace [@Facility] and TableB[Facility] with the corresponding destination and source columns. For example, use [@[office.y]] and TableB[Name] if those are the matching fields.
Check that the calculated column displays the first matching administrator for each row. A blank result means no matching facility and WOAR value of 1 was found.

Use helper keys for a more reliable XLOOKUP
Use this approach when you want to make the combined lookup criteria easier to inspect and reduce ambiguous concatenations.
Work with Excel spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Excel workbooks. Move existing files into WPS Spreadsheets and check formula compatibility before relying on the results.

Frequently Asked Questions
Why does my formula spill inside an Excel table?
A formula that returns TableB[Local Administrator] directly can return the entire column. Excel tables do not support spilled array formulas, so use XLOOKUP to return one matching value per row.
What happens if more than one row matches?
By default, XLOOKUP returns the first match in the lookup array. Check TableB for duplicate facility and WOAR combinations if you expect only one administrator.
Why does XLOOKUP return a blank?
The final empty-string argument tells XLOOKUP to return a blank when no match is found. Compare the facility names and WOAR values in both tables, including spaces and data types.
Can I use this formula in an older version of Excel?
XLOOKUP is available in Microsoft 365 and newer versions such as Excel 2021 and 2024, but not in Excel 2016 or 2019. Check your version under File > Account.




