How to Filter Excel Results to Show Only Visible Rows
Question details
The user wants to filter a dataset using dynamic arrays while ensuring that hidden or filtered-out rows are excluded from the final results.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Extracting specific records from a dataset where some rows are manually hidden or filtered out, requiring a formulaic approach to only return visible data.
- Observed behavior
- Standard functions return all matching data regardless of row visibility. The user needs a combined formula to evaluate visibility and apply additional criteria simultaneously.
Ensure you are using a modern version of Excel or WPS Spreadsheet that supports dynamic array functions such as FILTER, LET, BYROW, and LAMBDA.
Use Dynamic Array Formulas with SUBTOTAL and BYROW
Combine the FILTER function with BYROW, LAMBDA, and SUBTOTAL to dynamically evaluate row visibility and exclude hidden records.
The standard FILTER function does not automatically ignore hidden rows. By using the SUBTOTAL function with function_num 103, you can explicitly check if a cell is visible. Wrapping this in a BYROW and LAMBDA function allows the formula to evaluate the entire array row by row. You can then use the LET function to store this logic and apply your final criteria.
Click on the cell where you want the filtered, visible results to begin populating.
Type the formula: =LET(lgc,FILTER(A2:B9,BYROW(B2:B9,LAMBDA(a,SUBTOTAL(103,a)))),FILTER(lgc,CHOOSECOLS(lgc,2)>D2))
Modify the range A2:B9 to match your actual dataset, and B2:B9 to a column in your dataset that does not contain blank cells.
Change the condition CHOOSECOLS(lgc,2)>D2 to reflect the specific criteria you want to apply to the visible rows.
Press Enter. The formula will automatically spill the results, showing only the visible rows that meet your criteria.

Easily Filter and Analyze Data with WPS Office
WPS Spreadsheet fully supports advanced dynamic array formulas like FILTER, LET, and BYROW, making it incredibly easy to extract visible rows and perform complex data analysis without complicated workarounds.
- 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook containing the dataset.
- 2. Enter the formula: Select an empty cell and paste your combined LET, FILTER, and SUBTOTAL formula.
- 3. Get instant results: Press Enter to instantly generate a dynamic array of your filtered, visible rows.

Frequently Asked Questions
Why doesn't the standard FILTER function exclude hidden rows automatically?
The standard FILTER function evaluates the underlying values in the dataset regardless of their visual state on the sheet. To filter by visibility, you must incorporate a function like SUBTOTAL or AGGREGATE that explicitly checks if a row is hidden.
What does the '103' mean in the SUBTOTAL function?
In the SUBTOTAL function, '103' corresponds to the COUNTA operation while explicitly ignoring manually hidden rows. It returns 1 if the cell is visible and not empty, and 0 if the cell is hidden.
Can I use this formula in older spreadsheet versions?
No, this specific formula relies on functions like LET, BYROW, and LAMBDA, which are part of the dynamic arrays engine introduced in modern spreadsheet software (Microsoft 365, Excel 2021, and recent versions of WPS Office). Older versions require complex array formulas (Ctrl+Shift+Enter) or VBA macros.




