Count Yes or No in Noncontiguous Cells in WPS Spreadsheets
Question details
Count Yes or No values in selected cells across multiple noncontiguous columns.

- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- The answers are in cells D4, J4, P4, V4, and AB4, and the user wants to count a selected answer or both answers together.
- Observed behavior
- The desired result is a count that includes only the specified cells, not the columns between them.
Open the worksheet and confirm that D4, J4, P4, V4, and AB4 are the cells you want to count. Choose an empty cell for the result and a cell for the criterion.
Count a Selected Answer Across Noncontiguous Cells
Use this formula when you want to count either Yes or No based on a value in C13.
Select C13 and type Yes or No.
Select an empty result cell and enter =COUNTIF(D4,C13)+COUNTIF(J4,C13)+COUNTIF(P4,C13)+COUNTIF(V4,C13)+COUNTIF(AB4,C13).
Press Enter. Change C13 between Yes and No to count the other answer.

Calculate a Combined Total for Yes and No
Use separate counts and add them when you need the total number of cells containing either answer.
Count Selected Answers with WPS Spreadsheets
Use COUNTIF in WPS Spreadsheets to count a Yes or No criterion across selected cells without including the columns between them.
- 1. Open the workbook: Open WPS Spreadsheets and use Open to select your workbook.
- 2. Set the criterion: Enter Yes or No in cell C13.
- 3. Add the count formula: Select an empty cell and enter =COUNTIF(D4,C13)+COUNTIF(J4,C13)+COUNTIF(P4,C13)+COUNTIF(V4,C13)+COUNTIF(AB4,C13).
- 4. Calculate the result: Press Enter to display the count. Update the cell references if your answers are in different locations.

Frequently Asked Questions
Can I count Yes without using a criterion cell?
Yes. Replace C13 with "Yes" in each COUNTIF, for example, =COUNTIF(D4,"Yes")+COUNTIF(J4,"Yes"). Add the remaining cells in the same way.
Does COUNTIF distinguish between uppercase and lowercase answers?
No. COUNTIF is not case-sensitive, so a criterion of Yes also matches YES and yes.
How do I count answers in a continuous range instead?
For adjacent cells, use one range in the formula, such as =COUNTIF(D4:H4,C13). This counts every cell from D4 through H4.
Why does my count exclude a cell that appears to say Yes?
Check the cell for extra spaces or other characters. COUNTIF with the criterion Yes matches the cell's text, so an entry such as "Yes " may not match.




