logo
search
Function Problems

How to Filter Excel Results to Show Only Visible Rows

Partner EditorPartner Editor Oct 9, 2026 868 views

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.

How to Filter Excel Results to Show Only Visible Rows
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.
Before you start

Ensure you are using a modern version of Excel or WPS Spreadsheet that supports dynamic array functions such as FILTER, LET, BYROW, and LAMBDA.

Solution 1Recommended

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.

1
Select the destination cell

Click on the cell where you want the filtered, visible results to begin populating.

2
Input the dynamic formula

Type the formula: =LET(lgc,FILTER(A2:B9,BYROW(B2:B9,LAMBDA(a,SUBTOTAL(103,a)))),FILTER(lgc,CHOOSECOLS(lgc,2)>D2))

3
Adjust the data ranges

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.

4
Customize your filtering criteria

Change the condition CHOOSECOLS(lgc,2)>D2 to reflect the specific criteria you want to apply to the visible rows.

5
Execute the formula

Press Enter. The formula will automatically spill the results, showing only the visible rows that meet your criteria.

Use Dynamic Array Formulas with SUBTOTAL and BYROW
Formula Breakdown: SUBTOTAL(103,a) evaluates visibility (1 for visible, 0 for hidden), while the outer FILTER applies your custom conditions strictly to the visible subset.
Advanced Data Filtering

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. 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook containing the dataset.
  2. 2. Enter the formula: Select an empty cell and paste your combined LET, FILTER, and SUBTOTAL formula.
  3. 3. Get instant results: Press Enter to instantly generate a dynamic array of your filtered, visible rows.
Fully compatible with Microsoft Excel formulas and functions.Native support for modern dynamic arrays (FILTER, LET, BYROW, LAMBDA).Lightweight, fast, and completely free to use for daily spreadsheet tasks.Intuitive interface familiar to Excel users, ensuring seamless migration.
microsoft office alternative - wps office

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.