How to Fix XLOOKUP Errors with Dynamic Spilled Lists in Excel
Question details
The user needs to properly configure an XLOOKUP or VLOOKUP function to use a dynamic spilled list from another worksheet as the lookup value.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Looking up values where the lookup criteria is a dynamic array originating on a separate worksheet.
- Observed behavior
- Attempting to reference the dynamic list by selecting the entire column leads to #SPILL!, #VALUE!, and #REF! errors instead of returning the expected array of results.
Verify that the area where your XLOOKUP formula is expected to spill the results is completely empty, as any existing data or merged cells will trigger a #SPILL! error.
Reference the Spilled Range with the Hash (#) Operator
To dynamically feed a spilled array into an XLOOKUP or VLOOKUP function, append the spilled range operator (#) to the originating cell reference.
Referencing an entire column (like C:C) as a lookup value when dealing with dynamic arrays often overloads the calculation engine and leads to #VALUE! or #SPILL! errors. Using the hash (#) operator explicitly tells Excel to only process the exact size of the dynamic array, which optimizes performance and correctly spills the results.
Locate the top-left cell where your initial dynamic array formula resides (for example, cell C2).
Select the target cell for your results and type =XLOOKUP(C2# to assign the entire spilled list as your lookup value.
Navigate to the source worksheet and select your lookup column and return column. Your complete formula should look similar to =XLOOKUP(C2#,'Events '!C:C,'Events '!P:P).
Press Enter. The XLOOKUP function will dynamically calculate and spill down to match the exact length of your C2# array.

Correct Worksheet References to Fix #REF! Errors
If the formula results in a #REF! error, the syntax of the external sheet reference or the ranges may be mismatched or invalid.
Seamlessly Handle Dynamic Arrays with WPS Spreadsheet
WPS Spreadsheet offers full support for modern dynamic arrays, including functions like XLOOKUP and VLOOKUP. It seamlessly reads and executes spilled array operators (#) to help you manage large datasets effectively.
- 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your dynamic list.
- 2. Select the target cell: Click the empty cell where you want your XLOOKUP results to begin spilling.
- 3. Input the dynamic formula: Type your formula using the # operator, for example: =XLOOKUP(C2#, Sheet2!C:C, Sheet2!P:P).
- 4. Calculate and spill: Press Enter to run the formula. WPS Spreadsheet will automatically map the dynamic array and output the correct results.

Frequently Asked Questions
Why does my XLOOKUP formula return a #SPILL! error?
A #SPILL! error occurs when the formula needs to populate multiple cells, but one or more cells in the required spill path already contain data, spaces, or merged formatting. Clear the destination cells below your formula to resolve this.
Can I use an entire column as a lookup value instead of the # operator?
While it is technically possible to reference an entire column (like C:C), doing so forces the application to calculate over a million rows. This can cause severe performance lag and unexpected #VALUE! errors. Using the spilled range operator (C2#) is highly recommended for efficiency.
Is the spilled range operator (#) compatible with VLOOKUP?
Yes, you can use the hash operator with VLOOKUP just as you would with XLOOKUP. By using a formula like =VLOOKUP(C2#, Data!A:E, 2, FALSE), VLOOKUP will process the entire dynamic array and spill the corresponding results.




