How to Hide and Sort Rows in Excel Using Filters
Question details
The user wants to filter an Excel worksheet to hide rows with specific values, display only selected records, and sort the results by size without using a complex ActiveX button.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Organizing and analyzing categorical data (such as county sizes) by hiding irrelevant rows and sorting the remaining visible data.
- Observed behavior
- Seeking a simple and reliable method to filter and sort data rows, as using an ActiveX CommandButton is deemed too complicated and unnecessary for this task.
Ensure your dataset has clear column headers and contains no entirely blank rows or columns to guarantee the filter applies correctly to all your records.
Convert Data Range to an Excel Table to Filter and Sort
Converting your data into an Excel Table provides reliable, built-in filtering and sorting capabilities without the complexity of coding an ActiveX control.
Using Excel's built-in table feature is the most robust way to manage datasets. It automatically adds filter dropdowns to your headers and ensures any new data added to the bottom is automatically included in the table's filter range.
Select any cell within your data range and press 'Ctrl + T' on your keyboard. Ensure 'My table has headers' is checked, then click OK.
Click the drop-down arrow in the header of the column you want to filter. Hover over 'Number Filters' and select the appropriate condition (e.g., 'Greater Than'). Enter your threshold value to hide smaller records.
Click the same drop-down arrow on your filtered column and select 'Sort A to Z' or 'Sort Z to A' to order your visible records.

Apply Standard Data Filters Without a Table
If you prefer not to format your data as a structured table, you can apply standard data filters directly to your range from the ribbon menu.
Filter and Sort Data Effortlessly in WPS Spreadsheet
WPS Spreadsheet offers powerful, user-friendly filtering and sorting tools that perfectly handle large datasets. You can easily hide irrelevant rows, exclude blanks, and organize your data in seconds without any complex formulas or macros.
- 1. Open Your File: Launch WPS Spreadsheet and open your existing dataset.
- 2. Apply AutoFilter: Select your data range, go to the 'Data' tab on the top ribbon, and click 'AutoFilter'.
- 3. Filter the Rows: Click the drop-down arrow on your column header and select 'Number Filters' or uncheck values to hide unwanted rows.
- 4. Sort the Results: Click the same drop-down arrow and choose 'Sort Ascending' or 'Sort Descending' to organize your filtered data.

Frequently Asked Questions
Why shouldn't I use an ActiveX button to filter data?
ActiveX controls can be complex to set up as they require VBA coding. They are also prone to security warnings and may not work on Mac versions of Excel or alternative spreadsheet software. Built-in filters are much more robust, universally supported, and require no programming.
How do I clear a filter to show all hidden rows again?
To display all hidden rows, click the filter icon on the column header that currently has a filter applied (indicated by a funnel icon) and select 'Clear Filter from [Column Name]'. Alternatively, go to the Data tab and click 'Clear'.
Can I filter by multiple columns at the same time?
Yes. After applying a filter to one column, you can click the drop-down arrow on another column header to apply additional filtering criteria. This allows you to further narrow down your visible records based on multiple conditions.
Does sorting a filtered table mess up the hidden rows?
No, sorting a filtered table or data range only rearranges the visible rows. The hidden rows remain hidden and maintain their correct data associations across all columns when you eventually clear the filter.




