Function Problems

How to Check if All Cells Contain Yes in WPS Spreadsheets

Steven ParkerSteven Parker Nov 13, 2026 869 views

Question details

The user needs a formula in D4 that returns yes only when every cell in H5:H10 contains yes, and returns no when any cell contains no or another value.

How to Check if All Cells Contain Yes in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user is working with a worksheet and wants to verify that all six cells in the range H5:H10 meet a specific yes condition.
Observed behavior
The goal state is that D4 shows yes only when all six cells in H5:H10 contain yes; otherwise D4 shows no.
Before you start

Confirm that the target range is exactly H5:H10 and that D4 is empty or ready to receive the formula. Decide whether uppercase and lowercase 'yes' should be treated the same, because the COUNTIF approach is case-insensitive.

Solution 1Recommended

Use COUNTIF to Test All Cells in H5:H10 for Yes

Best for most users because it works in WPS Spreadsheets and Excel versions and returns exactly the required yes/no result.

The COUNTIF function counts how many cells in H5:H10 match the text "yes". Wrapping it in IF checks whether that count equals 6, the number of cells in the range, and returns "yes" only when every cell qualifies.

1
Select cell D4

Click cell D4 in your worksheet to make it the active cell where the result will appear.

2
Enter the COUNTIF formula

Type =IF(COUNTIF(H5:H10,"yes")=6,"yes","no") in the formula bar and press Enter.

3
Confirm the returned result

Check D4. It displays yes when all six cells in H5:H10 contain yes; otherwise it displays no.

Use COUNTIF to Test All Cells in H5:H10 for Yes
Case-insensitive matching: COUNTIF treats uppercase YES and lowercase yes as the same match. If strict lowercase matching is required, use an EXACT-based array formula.
WPS Spreadsheets formula

Test Multiple Cells with One Yes/No Formula in WPS Spreadsheets

Open your workbook in WPS Spreadsheets, select D4, and enter =IF(COUNTIF(H5:H10,"yes")=6,"yes","no") to get an instant yes/no result. WPS Spreadsheets supports Excel formulas and file formats, so the same COUNTIF logic works without changing your workflow.

  1. 1. Open the workbook: Launch WPS Office, click Open, and select the workbook that contains the H5:H10 range.
  2. 2. Select cell D4: Click cell D4 where the yes/no result should appear.
  3. 3. Type the formula: Enter =IF(COUNTIF(H5:H10,"yes")=6,"yes","no") in the formula bar.
  4. 4. Press Enter and review: Press Enter. D4 now shows yes only when every cell in H5:H10 contains yes; otherwise it shows no.
Checks a six-cell range with one compact COUNTIF formulaReturns an immediate yes/no result instead of manual inspectionSupports Excel formulas and opens .xlsx files without conversionFree, lightweight, and familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Does COUNTIF distinguish between uppercase YES and lowercase yes?

No. COUNTIF is case-insensitive in WPS Spreadsheets, so uppercase YES and lowercase yes both count as a match. If you need strict case matching, use an EXACT-based array formula instead.

Can I use this formula for a different range?

Yes. Replace H5:H10 with your actual range and change 6 to the number of cells in that range. For example, a range of A1:A10 would use =IF(COUNTIF(A1:A10,"yes")=10,"yes","no").

What should I do if the formula returns an error?

Check that the formula starts with an equal sign, includes quotation marks around yes, and references exactly the range H5:H10. Also confirm that D4 is selected as the output cell.

Does WPS Spreadsheets support Excel COUNTIF formulas?

Yes. WPS Spreadsheets supports COUNTIF, IF, and AND functions, and it can open and save .xlsx Excel workbooks while keeping formula behavior compatible.