How to Use Excel FILTER Instead of VLOOKUP for Multiple Matches
Question details
The user needs to retrieve all matching rows for a specific contact across multiple projects, overcoming VLOOKUP's limitation of only returning the first match.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- A user has a dataset where a single contact is associated with multiple records (projects) and wants to extract all matching rows for comparison.
- Observed behavior
- When using VLOOKUP, the formula stops searching and returns only the very first matching row it finds, ignoring all subsequent matching records.
Ensure you are using a modern spreadsheet application (such as Microsoft 365, Excel 2021, or the latest version of WPS Spreadsheet) that supports dynamic array functions, as the FILTER function is not available in older legacy versions.
Use the Dynamic Array FILTER Function
The most efficient way to return all matches for a given criteria is by replacing VLOOKUP with the dynamic array FILTER function.
Unlike VLOOKUP, which is designed to look for a single value and stop at the first match, the FILTER function evaluates an entire array based on a boolean condition. When it finds multiple matches, it automatically 'spills' the results into adjacent rows and columns, providing a complete view of all matching records.
Click on an empty cell in your worksheet where you want the upper-left corner of the extracted records to appear. Make sure there is enough empty space below and to the right for the data to spill into.
Type the formula `=FILTER(A2:H4, A2:A4=A10)`. In this syntax, `A2:H4` represents the complete data table you want to return, and `A2:A4` represents the specific column containing the names to evaluate.
Ensure the condition `A2:A4=A10` accurately references the cell (`A10`) that holds the specific contact name or project you are searching for. You can also hardcode the name using quotation marks, like `A2:A4="John Doe"`.
Press Enter on your keyboard. The function will dynamically retrieve and spill every row that matches your specified contact across the adjacent cells.

Easily Extract Multiple Matches with WPS Spreadsheet
WPS Spreadsheet provides full support for modern dynamic array functions, including the FILTER function. It allows you to quickly extract multiple records and bypass VLOOKUP limitations in a familiar, highly compatible environment.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open the workbook containing your contact and project data.
- 2. Select the destination cell: Click on the blank cell where you want your multiple matched records to be displayed.
- 3. Apply the FILTER formula: Type `=FILTER(data_range, lookup_column=target_value)`.
- 4. View all matches instantly: Press Enter to execute the formula and instantly view all matched rows spilled into the adjacent cells.

Frequently Asked Questions
Why does my FILTER formula return a #CALC! error?
The #CALC! error typically occurs when the FILTER function finds no records matching your criteria. You can prevent this error by utilizing the function's optional third argument to display a custom message. For example: `=FILTER(A2:H4, A2:A4=A10, "No matches found")`.
Can I filter data based on multiple conditions at once?
Yes, you can use multiple conditions by utilizing multiplication for AND logic or addition for OR logic. To return rows that match two specific criteria, structure your formula like this: `=FILTER(A2:H4, (A2:A4=A10)*(B2:B4="Completed"))`.
How can I sort the results returned by the FILTER function?
You can nest the FILTER function inside the SORT function to organize the output. For example, `=SORT(FILTER(A2:H4, A2:A4=A10), 2, 1)` will extract the matching rows and sort them by the second column in ascending order.
What if I only want to return specific columns instead of the entire row?
To return specific columns, you can nest multiple FILTER functions or use the CHOOSECOLS function alongside FILTER. For instance, `=CHOOSECOLS(FILTER(A2:H4, A2:A4=A10), 1, 3)` will only return the first and third columns for the matching records.




