logo
search
Function Problems

How to Count Yes Values in Nonadjacent Excel Cells

Tauseeq MagsiTauseeq Magsi Oct 21, 2026 869 views

Question details

The user wants to count the number of occurrences of a specific word (such as Yes) across multiple, non-contiguous drop-down cells.

How to Count Yes Values in Nonadjacent Cells Using Excel Formulas
Product
Excel
Device & OS
not provided
Scenario
Calculating exact totals from specific drop-down menus that are scattered across non-contiguous cells in a spreadsheet.
Observed behavior
A formula is needed to evaluate specific isolated cells (e.g., C7, C9, C11) without inadvertently counting the unrelated cells located between them.
Before you start

Verify that your drop-down menus are correctly configured and that the target text 'Yes' does not contain hidden trailing spaces, which can cause formula matching errors.

Solution 1Recommended

Add Multiple COUNTIF Functions Together

The most straightforward method for a small number of scattered cells is to add individual COUNTIF functions together in a single formula.

1
Select the destination cell

Click on the cell where you want the final count to be displayed.

2
Enter the combined formula

Type the formula: =COUNTIF(C7,"Yes")+COUNTIF(C9,"Yes")+COUNTIF(C11,"Yes"). Replace the cell references with the specific nonadjacent cells you need to evaluate.

3
Calculate the result

Press the Enter key. Excel will evaluate each cell individually and sum the results to give you the total count of 'Yes' values.

Add Multiple COUNTIF Functions Together
Formula Tip: This method is highly precise and guarantees that intervening cells (like C8 or C10) are completely ignored.
Powerful Data Analysis

Easily Manage Complex Formulas with WPS Spreadsheet

WPS Spreadsheet provides a robust and user-friendly platform for data analysis, offering full support for COUNTIF, SUMPRODUCT, and all standard Excel functions to help you count values across complex data ranges.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the document containing your drop-down menus.
  2. 2. Select an output cell: Click on the specific cell where you want the final Yes count to appear.
  3. 3. Input the formula: Type your COUNTIF or SUMPRODUCT formula exactly as you would in standard spreadsheet software.
  4. 4. Execute the calculation: Press Enter to instantly view your precise data count without compatibility issues.
Easily count specific text values across any scattered data range using familiar formula syntax.Highly compatible with Microsoft Excel formulas and file formats (.xlsx), ensuring seamless data migration.Lightweight application that processes complex array calculations and conditional logic instantly.Completely free to download and use for your daily spreadsheet management needs.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use COUNTIF with multiple non-contiguous ranges directly?

No, the standard COUNTIF function in Excel only accepts a single continuous range as its first argument. To evaluate multiple separate ranges, you must either add several COUNTIF functions together or use more advanced array formulas.

Why is my COUNTIF formula returning 0 when I can clearly see 'Yes' in the cells?

This usually happens due to hidden trailing or leading spaces in the target cells (e.g., 'Yes '). You can use the TRIM function to clean your data, or ensure the data validation drop-down list is strictly formatted to eliminate extra spaces.

Is there a way to count cells if they equal 'Yes' or 'No'?

Yes, you can sum two COUNTIF statements together, such as =COUNTIF(C7:C11,"Yes")+COUNTIF(C7:C11,"No"). Alternatively, for continuous ranges, you can use an array formula like =SUM(COUNTIF(C7:C11,{"Yes","No"})).