Function Problems

Use COUNTIFS to Return Yes or No by Group in WPS Spreadsheets

Adam DavisAdam Davis Nov 18, 2026 870 views

Question details

Return a Yes or No result for each identifier based on the statuses of all its records.

Use COUNTIFS to Return Yes or No by Group in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
An identifier can appear in multiple rows, each with a Yes or No status.
Observed behavior
The desired result is Yes only if every matching record is Yes; a single No should produce No.
Before you start

Place identifiers in one column and their statuses in another. In the examples below, identifiers are in A2:A12, statuses are in B2:B12, and D2 contains the identifier to check.

Solution 1Recommended

Check That Every Matching Status Is Yes

Use this formula to return No for any matching status that is not Yes and a blank when the identifier is not found.

1
Enter the identifier

In cell D2, enter an identifier that appears in A2:A12.

2
Enter the formula

In cell E2, enter =IF(COUNTIF($A$2:$A$12,D2)=0,"",IF(COUNTIFS($A$2:$A$12,D2,$B$2:$B$12,"Yes")=COUNTIF($A$2:$A$12,D2),"Yes","No")) and press Enter.

3
Apply it to other groups

Enter additional identifiers below D2, then drag the fill handle from E2 down to calculate their results. Adjust both data ranges to cover your records.

Check That Every Matching Status Is Yes
Blank and unexpected statuses: A blank or any value other than Yes in a matching row causes the formula to return No. An identifier with no matching rows returns a blank.
WPS Spreadsheets

Calculate Group Statuses in WPS Spreadsheets

Use COUNTIF and COUNTIFS in WPS Spreadsheets to check every status for an identifier and return a group-level Yes or No.

  1. 1. Open your worksheet: Open WPS Spreadsheets and select File > Open to choose your workbook.
  2. 2. Arrange the data: Place identifiers in A2:A12, statuses in B2:B12, and the identifier to check in D2.
  3. 3. Calculate the result: Select E2, enter =IF(COUNTIF($A$2:$A$12,D2)=0,"",IF(COUNTIFS($A$2:$A$12,D2,$B$2:$B$12,"Yes")=COUNTIF($A$2:$A$12,D2),"Yes","No")), and press Enter.
  4. 4. Fill down: Add more identifiers below D2 and drag the fill handle from E2 down to calculate each result.
Check all records for each identifier with one formulaReturn a blank when an identifier has no matching recordsOpen and edit Microsoft Excel XLSX and XLS filesCopy formulas down for multiple groups
microsoft office alternative - wps office

Frequently Asked Questions

Why does the shorter formula return Yes for an identifier that is not listed?

COUNTIFS finds zero matching No values when the identifier is absent, so the formula returns Yes. Use the formula with COUNTIF in the recommended solution to return a blank when there are no matching rows.

What happens if a matching status cell is blank?

The recommended formula returns No because the blank cell is not Yes. The shorter formula only looks for No, so it may return Yes despite the blank.

How do I use the formula for more than one identifier?

List the identifiers in column D, enter the formula in E2, and drag E2's fill handle down. The D2 reference changes for each row, while the ranges marked with dollar signs stay fixed.

Can I use these formulas in Microsoft Excel?

Yes. Microsoft Excel supports IF, COUNTIF, and COUNTIFS. Enter the same formula in a worksheet cell and adjust the ranges to match your data.