logo
search
Function Problems

How to Count 'Y' and 'Yes' Values in Excel Columns

Steve KSteve K Oct 15, 2026 869 views

Question details

The user needs to count the total number of cells in a specific Excel range that contain either the exact value 'Yes' or 'Y', and return a combined numeric total.

How to Count 'Y' and 'Yes' Values in Excel Columns
Product
Excel
Device & OS
not provided
Scenario
Analyzing survey data, attendance sheets, or checklists where affirmative responses are recorded inconsistently as either 'Y' or 'Yes'.
Observed behavior
A combined numeric count of all cells matching these specific text criteria is required to summarize the affirmative data.
Before you start

Identify the exact cell range (e.g., B2:B11) you want to analyze and check if your data contains unwanted trailing spaces, which might prevent exact match formulas from working correctly.

Solution 1Recommended

Use SUMPRODUCT to Count Exact 'Y' and 'Yes' Values

The SUMPRODUCT function is highly recommended as it perfectly handles array operations to count multiple specific text strings, and it works flawlessly across all versions of Excel.

By adding the two conditions together inside SUMPRODUCT, Excel evaluates which cells match 'Yes' and which match 'Y', returning a 1 for true and 0 for false, and then sums the total.

1
Select the Destination Cell

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

2
Enter the SUMPRODUCT Formula

Type `=SUMPRODUCT((B2:B11="Yes")+(B2:B11="Y"))` into the formula bar. Be sure to replace 'B2:B11' with the actual range of your data.

3
Calculate the Result

Press Enter. Excel will immediately display the total count of cells that exactly match either 'Yes' or 'Y'.

Use SUMPRODUCT to Count Exact 'Y' and 'Yes' Values
Version Compatibility: Unlike some legacy array formulas, SUMPRODUCT does not require you to press Ctrl+Shift+Enter. It works immediately upon pressing Enter in any Excel version.

Count Data Easily with WPS Spreadsheet

WPS Spreadsheet fully supports advanced array formulas like SUMPRODUCT and COUNTIF. You can effortlessly count and analyze data using the exact same formulas as Microsoft Excel, ensuring a seamless data processing experience.

  1. 1. Open Your Spreadsheet: Launch WPS Spreadsheet and open the document containing the data you need to count.
  2. 2. Select a Result Cell: Click on a blank cell where you want the final number to appear.
  3. 3. Input the Formula: Type `=SUMPRODUCT((B2:B11="Yes")+(B2:B11="Y"))`, replacing the cell range with your actual column data.
  4. 4. Press Enter: Hit Enter to instantly get the combined count of 'Y' and 'Yes' values in your sheet.
100% compatible with Microsoft Excel formulas and functionsProcesses complex array formulas like SUMPRODUCT instantlyLightweight application that runs smoothly even with large datasetsCompletely free to download and use for your daily tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why is my formula returning 0 even though 'Yes' is visible in the cells?

This usually happens due to hidden trailing or leading spaces in your cells (e.g., 'Yes '). You can either clean your data using the TRIM function first, or use the COUNTIF wildcard method `=COUNTIF(range,"*Yes*")` to count the words regardless of extra surrounding spaces.

Is there a simpler way to combine counts without array formulas?

Yes, you can simply add two standard COUNTIF functions together using a plus sign. For example: `=COUNTIF(B2:B11,"Yes") + COUNTIF(B2:B11,"Y")`. This approach is extremely easy to read and is natively supported across all spreadsheet software versions.

Are COUNTIF and SUMPRODUCT formulas case-sensitive?

No, standard logical comparisons in formulas like SUMPRODUCT, SUM, and COUNTIF are not case-sensitive. They will treat 'Yes', 'yes', 'YES', 'Y', and 'y' identically. If you need a strict case-sensitive count, you would need to combine SUMPRODUCT with the EXACT function.