How to Use the FILTER Function with Hidden Rows in Excel
Question details
The user wants to use the FILTER function to extract data, but it returns rows that have been manually hidden or hidden by a worksheet AutoFilter.

- Product
- Spreadsheets
- Device & OS
- not provided
- Scenario
- Extracting a specific dataset view where certain rows are hidden by an existing worksheet filter, but the array formula ignores the visual filter state.
- Observed behavior
- The FILTER function evaluates the source range independently and does not automatically exclude rows that are hidden by the worksheet's AutoFilter, resulting in unexpected junk data in the output.
Identify the exact criteria used in your AutoFilter, as you will need to recreate this logic within the FILTER function formula or utilize a dynamic helper column.
Incorporate AutoFilter Conditions Directly into the FILTER Formula
The most robust way to handle hidden rows is to build the hiding criteria directly into your FILTER function using boolean logic.
Because the FILTER function reads the raw data range directly, it disregards the worksheet's UI filters. To mimic the AutoFilter and exclude unwanted text, multiply multiple criteria arrays together inside the function.
Determine what rules are used to hide rows (e.g., excluding rows that contain the text 'Junk' or 'Ignore:').
Start your formula in an empty cell with the standard syntax: =FILTER(source_range, include_array, [if_empty]).
Combine your exclusion conditions using the asterisk (*). For example, to exclude 'Junk' and 'Ignore:', use: =FILTER(G6:G5009, (ISERROR(SEARCH("Junk", F6:F5009))) * (ISERROR(SEARCH("Ignore:", G6:G5009))), "").

Use a SUBTOTAL Helper Column to Detect Hidden Rows
Create a helper column that flags visible rows dynamically, and use that column as the criteria in your FILTER function.
Easily Manage Array Formulas and Filters in WPS Spreadsheet
WPS Spreadsheet fully supports advanced array functions like FILTER, SEARCH, and SUBTOTAL. You can seamlessly evaluate complex data sets and create dynamic reports without worrying about formatting compatibility.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open your .xlsx file containing the filtered data.
- 2. Enter the FILTER formula: Select the cell where you want the extracted data to appear and type your =FILTER(...) formula using multiple criteria.
- 3. Press Enter to spill results: Hit Enter, and WPS Spreadsheet will automatically spill the filtered results into the adjacent cells.
- 4. Save your document: Save your progress with full compatibility to share with other spreadsheet users.

Frequently Asked Questions
Why doesn't the FILTER function ignore rows hidden by AutoFilter?
The FILTER function works on the dataset's raw values in the memory. It ignores the visual state of the worksheet (like hidden or grouped rows) unless you explicitly use a visibility-checking function like SUBTOTAL.
Can I use 'OR' logic in the FILTER function instead of 'AND'?
Yes. To use 'OR' logic, use the plus sign (+) between your conditions instead of the asterisk (*). For example, include_array logic like (condition1) + (condition2) will return rows that meet either condition.
What does the IF_EMPTY argument do in the FILTER formula?
The IF_EMPTY argument (the third part of the formula, typically represented by empty quotes "") dictates what the formula displays if no rows meet your filtering criteria. It prevents the #CALC! error from appearing.




