How to Maintain Lookup Order Across Excel Worksheets Using Dynamic Arrays
Question details
Retrieve records across weekly worksheets while preserving their chronological order using dynamic arrays.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Searching for data records based on dependent dropdowns across multiple weekly data sets and maintaining their original retrieval order.
- Observed behavior
- Using INDIRECT to search across multiple sheets causes performance issues, volatility, and makes it difficult to preserve chronological order compared to a consolidated dynamic array approach.
Ensure your version of the spreadsheet application supports dynamic array functions, as these solutions rely heavily on newer functions like LET, XMATCH, LAMBDA, and MAP.
Combine Data into a Master Table
Consolidating weekly data into a single master table improves calculation speed and avoids the volatility of the INDIRECT function.
Rather than repeatedly calculating a large array inside a lookup function across multiple sheets, keeping all data in one table streamlines the lookup process. You can use a helper key column or a spill range to manage the lookup keys.
Insert a new worksheet and create a master table that will hold all the data from your individual weekly sheets.
Create a new column named 'Week' in your master table. Add data validation (dropdowns) to this column to easily identify and filter the week each record belongs to.
Copy and paste the data from your weekly worksheets into the master table, ensuring the 'Week' column correctly tags each row.

Use a Dynamic Array Formula for Fixed-Length Records
Apply a single-cell dynamic array formula using LET and XMATCH if each item always has the exact same number of records.
Apply a Fill-Down LAMBDA Function for Variable-Length Records
If the number of records varies per item, use a custom FILLDOWN function combined with SCAN to keep the chronological order intact.
Master Dynamic Arrays with WPS Spreadsheet
WPS Spreadsheet fully supports advanced dynamic array functions, LET, LAMBDA, and XLOOKUP, allowing you to easily manage complex lookups across large datasets without performance lag.
- 1. Download and install WPS Office: Get the latest version of WPS Office to ensure full access to the newest dynamic array functions.
- 2. Open your workbook: Launch WPS Spreadsheet and open your existing file containing the weekly datasets.
- 3. Combine your data: Create a master table sheet and paste all your weekly records into it to optimize performance.
- 4. Apply the dynamic array formulas: Use the provided LET and XMATCH formulas to retrieve your ordered records automatically.

Frequently Asked Questions
Why is combining sheets into a master table better than using INDIRECT?
The INDIRECT function is highly volatile, meaning it recalculates every time any change is made anywhere in the workbook. When used across multiple sheets for large arrays, it drastically slows down spreadsheet performance. A consolidated master table with a 'Week' column calculates much faster and is easier to maintain.
What does the SCAN function do in this dynamic array formula?
The SCAN function iterates over an array and applies a custom LAMBDA function to each value, carrying over an accumulator. In this context, it helps create a custom 'fill-down' effect to carry over text identifiers for variable-length records, filling in the blanks dynamically.
How do I handle varying record lengths when using dynamic arrays for lookups?
You can use a custom FILLDOWN LAMBDA function nested inside a LET formula. This technique fills blank rows logically with the identifier from the row above it, ensuring each row has a complete and accurate lookup key before using XMATCH to retrieve the data chronologically.




