Function Problems

How to Filter Groups Where Every Row Meets a Condition in WPS Spreadsheets

Phi Hung VoPhi Hung Vo Nov 13, 2026 869 views

Question details

The user needs to filter a data range by product group so that only groups whose every row has the status 'Widely Recycled' are returned; any product group containing a 'Not Currently Recycled' row must be excluded.

How to Filter Groups Where Every Row Meets a Condition in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user has a table with product codes and a recycling status column and wants to analyze only product groups that are consistently 'Widely Recycled'.
Observed behavior
The goal state is a filtered result set that excludes any product group if at least one row shows 'Not Currently Recycled'.
Before you start

Make sure your data uses consistent status text and that the product code column is included in the formula range. Open the workbook in WPS Spreadsheets and confirm that your version supports the FILTER and COUNTIFS functions, or plan to use the helper-column method.

Solution 1Recommended

Use the FILTER, COUNTIF and COUNTIFS Functions to Return Groups Where Every Row Meets a Condition

Best for a dynamic result that updates automatically when data changes; this method filters out any product group that contains a non-matching status.

The formula compares the total number of rows for each product code with the number of rows for that product code that have the status 'Widely Recycled'. Only when those counts are equal does FILTER return the group's rows.

1
Select the result cell

Click an empty cell where you want the filtered result to start, such as F2.

2
Enter the FILTER formula

Type =FILTER(A2:D6,COUNTIF(A2:A6,A2:A6)=COUNTIFS(A2:A6,A2:A6,$D$2:$D$6,"Widely Recycled")) and press Enter.

3
Review the spilled result

WPS Spreadsheets fills the matching rows automatically. Confirm that groups with any 'Not Currently Recycled' row are not shown.

4
Adjust the range if needed

If your data extends beyond row 6 or the columns differ, update A2:D6, A2:A6, and $D$2:$D$6 to match the actual range.

Use the FILTER, COUNTIF and COUNTIFS Functions to Return Groups Where Every Row Meets a Condition
Filter applied successfully: Only product groups whose rows all meet the 'Widely Recycled' condition remain visible.
WPS Spreadsheets tip

Filter Product Groups Where Every Row Meets a Condition in WPS Spreadsheets

Use WPS Spreadsheets' Excel-compatible FILTER, COUNTIF, and COUNTIFS functions to isolate product groups whose rows all meet the same status, and save the workbook as an Excel file when you need to share it with Microsoft Excel users.

  1. 1. Open your workbook: Launch WPS Spreadsheets and open the Excel workbook that contains the product groups and status column.
  2. 2. Enter the group-filter formula: Select an empty result cell and enter the FILTER/COUNTIF/COUNTIFS formula from the solution above.
  3. 3. Review qualifying groups: Check the spilled range to confirm that only groups where every row is 'Widely Recycled' appear.
  4. 4. Save in Excel format: Click Menu > Save As and choose .xlsx to keep the file compatible with Microsoft Excel.
Excel-compatible FILTER, COUNTIF, and COUNTIFS formulasDirectly filters groups based on every row meeting a conditionSaves and opens .xlsx files with full Microsoft Excel compatibilityFree, lightweight spreadsheet tool with a familiar Excel-style interface
microsoft office alternative - wps office

Frequently Asked Questions

Does this formula work in WPS Spreadsheets on Windows and Mac?

Yes. WPS Spreadsheets supports Excel-compatible formulas on Windows, macOS, and mobile platforms when your version supports dynamic array functions. If FILTER is not available, use the helper-column method instead.

What should I do if the formula returns #SPILL!?

Clear the cells below and to the right of the formula cell so the dynamic array has enough space to spill, or move the formula to a blank area.

How do I change the condition from 'Widely Recycled' to another status?

Replace 'Widely Recycled' in the COUNTIFS part with your desired status text, and make sure it matches the values in the status column exactly.

Can I save the filtered result as an Excel file?

Yes. After applying the formula or filter, go to Menu > Save As and choose .xlsx to maintain compatibility with Microsoft Excel.