Function Problems

How to Fix XLOOKUP Errors with Dynamic Spilled Lists in Excel

Adam DavisAdam Davis Oct 23, 2026 870 views

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.

How to Fix XLOOKUP Errors with Dynamic Spilled Lists in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Identify the origin of the dynamic list

Locate the top-left cell where your initial dynamic array formula resides (for example, cell C2).

2
Write the XLOOKUP function

Select the target cell for your results and type =XLOOKUP(C2# to assign the entire spilled list as your lookup value.

3
Define the lookup and return arrays

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).

4
Execute the formula

Press Enter. The XLOOKUP function will dynamically calculate and spill down to match the exact length of your C2# array.

Reference the Spilled Range with the Hash (#) Operator
VLOOKUP Alternative: This method works identically for VLOOKUP. If preferred, you can use the formula =VLOOKUP(C2#,'Events '!C:P,14,FALSE) to achieve the same dynamic result.
Advanced Data Analysis

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. 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your dynamic list.
  2. 2. Select the target cell: Click the empty cell where you want your XLOOKUP results to begin spilling.
  3. 3. Input the dynamic formula: Type your formula using the # operator, for example: =XLOOKUP(C2#, Sheet2!C:C, Sheet2!P:P).
  4. 4. Calculate and spill: Press Enter to run the formula. WPS Spreadsheet will automatically map the dynamic array and output the correct results.
100% compatibility with Microsoft Excel formulas, including XLOOKUP and dynamic arrays.Lightweight processing engine that quickly handles complex spilled arrays without lag.User-friendly interface makes it easy to debug formula errors like #SPILL! and #REF!.
microsoft office alternative - wps office

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.