How to Return Multiple Matching Values in Excel: INDEX MATCH Alternatives
Question details
The user needs to extract all data records that match a specific lookup value across dynamically selected worksheets.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Pulling multiple related data rows based on a single search criterion, where the target worksheet name is stored in a cell and changes dynamically.
- Observed behavior
- The standard INDEX and MATCH formula stops executing after finding the first match, failing to retrieve any subsequent matching records for the same lookup value.
Verify your current Excel version. The highly recommended FILTER function is only available in Microsoft 365, Excel 2021, and Excel for the web. If you are using an older version (like Excel 2019 or earlier), you will need to use the array formula method.
Use the FILTER Function (Recommended for Modern Excel)
This is the most efficient and robust method to extract multiple matches dynamically without relying on complex array formulas.
The FILTER function is designed specifically to output arrays of data based on criteria. By combining FILTER with the INDIRECT function, you can dynamically build the sheet reference from a cell value and instantly spill all matching records.
Click on the topmost blank cell where you want your multiple matching results to begin displaying.
Type the formula: =FILTER(INDIRECT("'"&J$14&"'!B1:B1000"),INDIRECT("'"&J$14&"'!A1:A1000")=D$12,""). This formula uses INDIRECT to read the worksheet name from cell J14, checks column A for the lookup value in D12, and returns the corresponding data from column B.
Hit Enter on your keyboard. Excel will automatically 'spill' all corresponding matching values down the column into the required number of rows.

Use INDEX, SMALL, and IF (For Older Excel Versions)
Use this classic array formula approach if you are using Excel 2019, 2016, or older versions that do not support dynamic array functions.
Easily Extract Multiple Matches with WPS Office
WPS Spreadsheet natively supports both legacy array formulas and modern dynamic array functions like FILTER. You can effortlessly query multiple matching values and streamline your data analysis for free.
- 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your .xlsx file containing the dataset and dynamic references.
- 2. Navigate to the results area: Click on the specific empty cell where you want to output your list of matching items.
- 3. Apply the dynamic FILTER function: Enter the =FILTER() function, specifying your return array and your logical test criteria. You can combine it with INDIRECT if your sheet references are dynamic.
- 4. Generate your matching list: Press Enter to instantly retrieve and display all matching results from your dataset without manual copying.

Frequently Asked Questions
Why does INDEX and MATCH only return the first value?
By design, standard lookup functions in Excel such as VLOOKUP, XLOOKUP, and MATCH scan data linearly from top to bottom. They stop calculating and return a result as soon as they encounter the very first exact match that meets the specified criteria.
What does a #SPILL! error mean when using the FILTER function?
A #SPILL! error occurs when the FILTER formula attempts to output multiple matching values, but the space below the formula cell is blocked by existing data or text. Clearing the blocking cells will immediately resolve the error and display all matches.
Can I return multiple matches from another workbook?
Yes, you can use the FILTER function across different workbooks. However, both workbooks must be open at the same time for the FILTER function to work correctly. If the source workbook is closed, the formula will return a #REF! error.




