Function Problems

Count Yes or No in Noncontiguous Cells in WPS Spreadsheets

Steve KSteve K Dec 2, 2026 868 views

Question details

Count Yes or No values in selected cells across multiple noncontiguous columns.

Count Yes or No in Noncontiguous Cells in WPS Spreadsheets
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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the criterion

Select C13 and type Yes or No.

2
Enter the formula

Select an empty result cell and enter =COUNTIF(D4,C13)+COUNTIF(J4,C13)+COUNTIF(P4,C13)+COUNTIF(V4,C13)+COUNTIF(AB4,C13).

3
View the count

Press Enter. Change C13 between Yes and No to count the other answer.

Count a Selected Answer Across Noncontiguous Cells
Only the listed cells are counted: The formula ignores cells between the listed columns. Replace the cell references if your answers are stored elsewhere.
Count answers in WPS Spreadsheets

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. 1. Open the workbook: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Set the criterion: Enter Yes or No in cell C13.
  3. 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. 4. Calculate the result: Press Enter to display the count. Update the cell references if your answers are in different locations.
Count answers in noncontiguous cells with a single formulaChange the criterion cell to switch between Yes and NoOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

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.