How to Keep Manual Comments Matched to Dynamic FILTER Results
Question details
The user needs a way to keep manually entered comments aligned with the correct rows when using a dynamic spilling FILTER formula, as changes in source data cause rows to shift.

- Product
- Spreadsheets
- Device & OS
- not provided
- Scenario
- Adding manual notes or comments adjacent to a dynamic array generated by a FILTER function.
- Observed behavior
- When the source data updates, the FILTER results expand, contract, or reorder, causing manually typed comments in adjacent columns to misalign with their intended records.
Ensure your source data includes a unique identifier (like a Record ID or Product Code) for each row, as this is required to accurately link your comments to the dynamic results.
Use XLOOKUP to Link Comments to a Unique ID
Store your manual comments in a separate static table and retrieve them using XLOOKUP next to your dynamic FILTER array.
Typing directly next to a spilled array is risky because the array changes size and order based on the source data. By storing comments in a dedicated lookup table, you tie the comment to the record's unique ID rather than its row number.
Set up a new range or sheet with two columns: one for the unique 'Record ID' and one for the 'Manual Comment'. Enter your notes here.
Locate which column in your spilled FILTER array contains the unique Record ID (for example, column F).
In the column immediately to the right of your spilled array, enter the formula =XLOOKUP(F2, CommentTable!A:A, CommentTable!B:B, "") where F2 is the first ID in your spilled results.
If supported, use the # spill operator (e.g., =XLOOKUP(F2#, CommentTable!A:A, CommentTable!B:B, "")) so the comments automatically expand with the FILTER result, or drag the formula down manually.

Easily Manage Dynamic Arrays and Lookups with WPS Office
WPS Spreadsheet fully supports advanced dynamic array functions like FILTER and XLOOKUP, allowing you to build robust, automated reports without worrying about misaligned data.
- 1. Open your dataset in WPS: Launch WPS Spreadsheet and open your workbook containing the source data.
- 2. Apply the FILTER function: Type =FILTER(range, condition) to extract your dynamic data into a new area.
- 3. Create your comment lookup: Set up a static table for comments, then use =XLOOKUP() beside your spilled array to fetch comments accurately based on unique IDs.

Frequently Asked Questions
Why do I get a #SPILL! error when typing next to my FILTER function?
A #SPILL! error occurs if manually entered text (like comments) blocks the range where the FILTER function needs to display its dynamic results. Always place manual entries outside the expected spill range or use a separate lookup table.
Can I use VLOOKUP instead of XLOOKUP for this?
Yes, you can use VLOOKUP if your unique ID is in the first column of your comment table. However, XLOOKUP is generally recommended because it allows searching in any direction and handles missing matches more elegantly without requiring an IFERROR wrapper.
What if my data doesn't have a unique ID?
If there is no single unique column, you can create a helper column that concatenates two or more columns (e.g., =A2&B2 for First Name and Last Name) to create a unique identifier for your XLOOKUP function to match against.




