Function Problems

How to Filter One Excel Table Using Multiple Values from Another Table

Algirdas JasaitisAlgirdas Jasaitis Nov 10, 2026 869 views

Question details

The user wants to extract rows from a primary data table based on multiple match criteria listed in a separate reference table.

How to Filter One Excel Table Using Multiple Values from Another Table
Product
Spreadsheet
Device & OS
not provided
Scenario
Filtering a large dataset where a specific column needs to match any of the multiple values provided in a secondary list.
Observed behavior
Dynamic array functions process the criteria and spill an array of all matching rows from the first table without manual filtering.
Before you start

Ensure both your main dataset and your criteria list are formatted as official Tables (using Insert > Table) so that any future rows added will automatically update your dynamic formula results. Verify that your spreadsheet software supports dynamic array functions like FILTER.

Solution 1Recommended

Use FILTER and COUNTIF Functions

This is the most straightforward and efficient method to return rows from the first table when a column matches any value in the second table.

The FILTER function extracts the data, while COUNTIF acts as a logical test to check if the value in the main table exists within the criteria table.

1
Select an output cell

Click on an empty cell where you want the top-left corner of your filtered results to appear. Ensure there is enough empty space below and to the right for the data to spill.

2
Input the FILTER and COUNTIF formula

Type the formula: =FILTER(Table1, COUNTIF(Table2[Filter], Table1[Year]), "No data").

3
Adjust table references

Replace 'Table1' with the name of your main data table, 'Table1[Year]' with the column you are evaluating, and 'Table2[Filter]' with the column containing your multiple criteria.

4
Execute the formula

Press Enter. The formula will automatically spill all matching rows into the adjacent cells.

Use FILTER and COUNTIF Functions
Handling Empty Results: The "No data" argument at the end of the FILTER function prevents a #CALC! error from appearing if none of the criteria are met.

Efficiently Filter Complex Data with WPS Spreadsheet

WPS Spreadsheet fully supports advanced dynamic array functions like FILTER, COUNTIF, VSTACK, and REDUCE. You can easily cross-reference and extract data across multiple tables without relying on manual filters or macros.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open the file containing your main table and criteria table.
  2. 2. Enter the dynamic array formula: Select a blank cell and input the =FILTER combined with COUNTIF formula tailored to your table ranges.
  3. 3. View instant results: Press Enter to instantly display the spilled array of filtered data, which will update automatically if your criteria change.
Fully compatible with Microsoft Excel formulas and dynamic array functions.Free, lightweight, and fast spreadsheet tool for handling large datasets.User-friendly interface with built-in formula checking and syntax highlighting.Seamlessly migrate your existing Excel workbooks without losing formula functionality.
microsoft office alternative - wps office

Frequently Asked Questions

Why am I getting a #CALC! error when using the FILTER function?

The #CALC! error occurs when the FILTER function finds no matching records and you haven't provided a default value in the [if_empty] argument. Add a text string like "No data" at the very end of your formula (e.g., =FILTER(range, criteria, "No data")) to resolve this.

How do I ensure the formula updates automatically when I add new criteria?

You should format your criteria list as an official Table by selecting the data and pressing Ctrl+T. When you use structured table references (like Table2[Filter]) in your COUNTIF or REDUCE formula, the range will automatically expand to include any new criteria you type at the bottom.

Can I filter based on partial text matches from another table?

Yes, but you need to modify the COUNTIF criteria using wildcards. Instead of an exact match, use wildcards in the COUNTIF function, such as "*"&Table2[Filter]&"*", which allows the formula to search for partial text string matches across your main table.

Does WPS Spreadsheet fully support functions like LAMBDA and VSTACK?

Yes, the latest versions of WPS Office fully support modern dynamic array functions, including FILTER, VSTACK, BYROW, REDUCE, and LAMBDA, ensuring complete compatibility with advanced Excel formulas.