Count Yes Rows with Multiple Blank Criteria in Excel
Question details
Count cells containing Yes in P4:P200 when the corresponding cells in R4:R200 and S4:S200 are blank.

- 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.
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.
Use COUNTIFS to count Yes rows with two blank cells
Use COUNTIFS to apply all three conditions in one formula.
In Excel, click an empty cell outside the data ranges where you want the count to appear.
Type =COUNTIFS($P$4:$P$200,"YES",$R$4:$R$200,"",$S$4:$S$200,"") and press Enter.
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 SUMPRODUCT as an alternative to COUNTIFS
Use SUMPRODUCT when you prefer to combine the three conditions as array comparisons.
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. Open the workbook: In WPS Spreadsheets, select Open and choose the workbook containing your data.
- 2. Select a result cell: Click an empty cell outside P4:S200 where you want to display the count.
- 3. Enter COUNTIFS: Type =COUNTIFS($P$4:$P$200,"YES",$R$4:$R$200,"",$S$4:$S$200,"") and press Enter.
- 4. Save the workbook: Select File > Save to keep the formula in your workbook.

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.




