Count Yes Responses and Calculate Their Percentage in Excel
Question details
Count Yes entries in a response column and calculate their percentage among nonblank responses.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains Yes and No responses in one column, with summary results needed below the data.
- Observed behavior
- The user wants a count of Yes responses and a formatted percentage based on nonblank entries.
Identify the cells containing responses, excluding the column header and any summary cells. The example uses D2:D100; replace it with your actual response range.
Use COUNTIF to count Yes responses and calculate the percentage
Use this method to count Yes entries and divide by the number of nonblank cells in the response range.
Select an empty cell below the responses, outside D2:D100, and enter =COUNTIF(D2:D100,"Yes").
Select another empty cell outside the response range and enter =IFERROR(COUNTIF(D2:D100,"Yes")/COUNTIF(D2:D100,"<>"),0). This returns 0 if the range is empty.
Select the percentage formula cell and choose Home > Percent Style. Use the decimal controls on the Home tab if you want to adjust the displayed precision.

Count Yes Responses in WPS Spreadsheet
Use COUNTIF formulas in WPS Spreadsheet to count Yes responses and calculate their share of nonblank entries, then format the result as a percentage.
- 1. Open the worksheet: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Count Yes entries: In an empty cell outside the response range, enter =COUNTIF(D2:D100,"Yes"), replacing D2:D100 with your data range.
- 3. Calculate the share: In another empty cell outside the response range, enter =IFERROR(COUNTIF(D2:D100,"Yes")/COUNTIF(D2:D100,"<>"),0), using the same data range.
- 4. Apply percentage formatting: Select the percentage result and choose the percent format on the Home tab.

Frequently Asked Questions
Do blank cells affect the Yes percentage?
No. COUNTIF(D2:D100,"<>") counts nonblank cells, so blank cells are excluded from the denominator.
Why should I avoid using the entire column in the formula?
A bounded range such as D2:D100 can improve performance and prevents a formula placed below the data in column D from referring to its own cell.
How can I count only Yes and No responses in the denominator?
Use =IFERROR(COUNTIF(D2:D100,"Yes")/(COUNTIF(D2:D100,"Yes")+COUNTIF(D2:D100,"No")),0), then format the result as a percentage.
What happens if there are no responses?
The IFERROR percentage formula returns 0 instead of a division-by-zero error when the response range has no nonblank cells.




