Function Problems

Count Yes Rows with Multiple Blank Criteria in Excel

Steven ParkerSteven Parker Nov 20, 2026 869 views

Question details

Count cells containing Yes in P4:P200 when the corresponding cells in R4:R200 and S4:S200 are blank.

Count Yes Rows with Multiple Blank Criteria in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet has Yes values in column P and two corresponding columns that must both be blank for a row to count.
Observed behavior
The desired result is a count of rows that meet all three conditions.
Before you start

Check that columns P, R, and S contain the data to evaluate and that all three ranges cover rows 4 through 200. Cells containing spaces are not considered blank.

Solution 1Recommended

Use COUNTIFS to count Yes rows with two blank cells

Use COUNTIFS to apply all three conditions in one formula.

1
Select a result cell

In Excel, click an empty cell outside the data ranges where you want the count to appear.

2
Enter the formula

Type =COUNTIFS($P$4:$P$200,"YES",$R$4:$R$200,"",$S$4:$S$200,"") and press Enter.

3
Check the result

Review the displayed count against the rows in P4:S200. A row counts only if P contains Yes and both R and S are blank.

Use COUNTIFS to count Yes rows with two blank cells
How blank criteria work: The empty-string criteria can also match cells whose formulas return an empty string. A cell containing a space is not blank.
Count matching rows in WPS Spreadsheets

Apply the same COUNTIFS formula in WPS Spreadsheets

Open your workbook in WPS Spreadsheets and use COUNTIFS to count Yes values only when both corresponding cells are blank.

  1. 1. Open the workbook: In WPS Spreadsheets, select Open and choose the workbook containing your data.
  2. 2. Select a result cell: Click an empty cell outside P4:S200 where you want to display the count.
  3. 3. Enter COUNTIFS: Type =COUNTIFS($P$4:$P$200,"YES",$R$4:$R$200,"",$S$4:$S$200,"") and press Enter.
  4. 4. Save the workbook: Select File > Save to keep the formula in your workbook.
Count rows with multiple criteria in a single formula.Open and edit Microsoft Excel XLSX files.Use a familiar spreadsheet interface.Work with spreadsheet files for free.
microsoft office alternative - wps office

Frequently Asked Questions

Does COUNTIFS distinguish between Yes and YES?

No. The criterion "YES" matches Yes, yes, and other capitalization variants in the specified range.

Why isn't a row counted when one of the cells looks blank?

Check the corresponding cells in columns R and S for spaces or other hidden content. A cell containing a space does not satisfy the blank criterion "".

Can a formula returning an empty string match the blank criteria?

Yes. COUNTIFS criteria written as "" can match cells containing formulas that return an empty string.

How do I include more rows in the count?

Edit the formula in the formula bar and extend all three ranges to the same ending row. For example, change each $200 to $500.