How to Return Matching Data by Criteria Using FILTER-Style Logic in Excel
Question details
The user needs a formula to return values across multiple columns based on a specific matching identifier, leaving the cell blank if there is no corresponding record in the source data.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Extracting and organizing relational data from a source table into separate columns dynamically based on header identifiers.
- Observed behavior
- Instead of returning errors or using complex array filters that compress the rows, the desired output is to align the corresponding values for a match and output an empty string (blank) for non-matches.
Ensure your source data is formatted as an official Excel Table (e.g., 'Table3') so that structured references update dynamically, and verify that your destination headers exactly match the identifiers in your source data.
Use an IF Formula with Structured Table References
This method uses a simple IF statement mapped to table columns to return matched values or a blank cell, ensuring high performance.
Using structured references with a standard IF statement allows Excel to process the criteria efficiently row by row. It avoids the heavy calculation times associated with complex array functions like PIVOTBY or SEQUENCE on large datasets.
Ensure the headers in your destination range (for example, cells E1:G1) contain the exact identifiers you want to match against your source table.
Select the first cell under your destination headers (e.g., E2) and enter the formula: =IF(Table3[rnti1]=E$1,Table3[corr0],""). Replace 'Table3', 'rnti1', and 'corr0' with your actual table name, criteria column, and return value column.
Select cell E2, click and drag the fill handle to the right to copy the formula through the remaining columns (e.g., to G2). Then, select the filled row and drag the fill handle down to apply the logic to all rows.

Extract Data Using Power Query
For larger datasets or complex transformations, Power Query is a robust alternative to cell-based formulas.
Effortlessly Manage Data and Formulas with WPS Spreadsheet
WPS Office provides a powerful Spreadsheet application fully compatible with Excel formulas, structured table references, and advanced data filtering logic.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your dataset in the Spreadsheet application.
- 2. Format Data as a Table: Select your data and press Ctrl+T to format it as a table, enabling dynamic structured formula references.
- 3. Apply the Matching Formula: Enter your conditional logic formula in the target cell and use the drag-fill handle to populate your results instantly across multiple columns.

Frequently Asked Questions
Why does my formula return #VALUE! instead of blanks?
This usually happens if the structured references are pointing to an entire column improperly in a context that expects a single value, or if there is a data type mismatch. Ensure you are comparing individual row instances and that your table boundaries are correct.
Can I use the FILTER function instead of IF for this?
Yes, you can use the FILTER function to extract only the matching records. However, if your layout requires keeping the exact row structure and leaving blanks for missing records on specific rows, the IF formula approach maintains the row-by-row alignment much better.
How do I lock the row reference in my formula?
By adding a dollar sign ($) before the row number, such as E$1. This mixed reference ensures that when you drag the formula down to fill other rows, it will always refer back to the identifiers located in row 1.
Why do some complex array functions take too long to calculate?
Functions like SEQUENCE, DROP, and PIVOTBY recalculate large arrays every time a change is made. If applied across thousands of rows and multiple columns, it consumes significant memory. Using simple logical statements like IF inside a structured table is highly optimized and calculates much faster.




