Function Problems

Count Yes Responses and Calculate Their Percentage in Excel

Tauseeq MagsiTauseeq Magsi Dec 2, 2026 869 views

Question details

Count Yes entries in a response column and calculate their percentage among nonblank responses.

Count Yes Responses and Calculate Their Percentage in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the Yes count

Select an empty cell below the responses, outside D2:D100, and enter =COUNTIF(D2:D100,"Yes").

2
Calculate the percentage

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.

3
Format the result

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.

Use COUNTIF to count Yes responses and calculate the percentage
Check the denominator: The percentage counts every nonblank cell in the range, including entries other than Yes or No. Keep headers and summary formulas outside the range, and update the range if responses extend beyond it.
Calculate responses in WPS

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. 1. Open the worksheet: Open WPS Spreadsheet and use Open to select your Excel workbook.
  2. 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. 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. 4. Apply percentage formatting: Select the percentage result and choose the percent format on the Home tab.
Count Yes responses and calculate percentages with familiar formulas.Open and save Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface to format results.
microsoft office alternative - wps office

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.