How to Count 'Y' and 'Yes' Values in Excel Columns
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.

- 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.
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.
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.
Click on a blank cell where you want the final combined count to be displayed.
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.
Press Enter. Excel will immediately display the total count of cells that exactly match either 'Yes' or 'Y'.

Use COUNTIF with Wildcards for Any Value Starting with 'Y'
If you want to count any cell that begins with the letter 'Y' (which naturally includes 'Yes', 'Y', 'Yeah', 'Yep', etc.), you can use the COUNTIF function with a wildcard.
Use the SUM Function in Newer Excel Versions
For users on Microsoft 365 or Excel 2021 and newer, the standard SUM function is capable of processing array conditions directly thanks to dynamic arrays.
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. Open Your Spreadsheet: Launch WPS Spreadsheet and open the document containing the data you need to count.
- 2. Select a Result Cell: Click on a blank cell where you want the final number to appear.
- 3. Input the Formula: Type `=SUMPRODUCT((B2:B11="Yes")+(B2:B11="Y"))`, replacing the cell range with your actual column data.
- 4. Press Enter: Hit Enter to instantly get the combined count of 'Y' and 'Yes' values in your sheet.

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.




