Countifs Count Blank Cells? Answer & Workarounds

Formulas & functions · Updated November 23, 2026

No, the COUNTIFS function in Excel does not count truly blank cells when you use the criteria "" — it counts cells that appear empty but actually contain a formula that returns an empty string (“”). To count genuinely blank cells, you need to use COUNTBLANK, or use COUNTIFS with the criteria "=" (which counts truly empty cells) or "<>" (which counts non-blank cells). This article explains exactly how each approach works, why COUNTIFS behaves this way, and how to choose the right method for your data.

Why COUNTIFS Treats Blank Cells Differently

COUNTIFS is designed to count cells that meet multiple criteria. When you use "" as a criterion, Excel interprets it as “cells that contain an empty string.” A truly blank cell does not contain any string — it has no value at all. So COUNTIFS with "" will only count cells that have a formula like =IF(A1=1,"","x") that returns an empty string, or cells where someone manually typed an apostrophe (‘) which is invisible but counts as text.

In contrast, a truly blank cell has no formula, no text, no number — it is completely empty. COUNTIFS with "" ignores those cells. This is a common source of confusion because many users expect "" to mean “blank.”

How to Count Truly Blank Cells with COUNTIFS

If you need to count cells that are completely empty (no formula, no value), you can use the criterion "=" (equals sign). For example, with data in A2:A20, the formula:

=COUNTIFS(A2:A20,"=")

This counts cells that are truly blank. Note: this formula counts cells that are empty, but it does NOT count cells that contain an empty string from a formula. To count cells that are not blank (i.e., contain any value, including an empty string), use "<>":

=COUNTIFS(A2:A20,"<>")

This counts cells that have any content, even if that content is an empty string. If you want to count cells that are truly blank AND also cells that contain an empty string (i.e., visually empty), you need a different approach.

Using COUNTBLANK for Visual Blanks

The simplest way to count all cells that look blank (including those with empty strings) is to use the COUNTBLANK function. It counts cells that are truly empty OR contain a formula that returns an empty string. For example:

=COUNTBLANK(A2:A20)

This returns the number of cells in A2:A20 that are visually blank. However, COUNTBLANK does not allow multiple criteria. If you need to count blank cells that also meet another condition (e.g., blank cells in column A where column B equals “Yes”), you can use SUMPRODUCT or a combination of COUNTIFS and COUNTBLANK.

Counting Blank Cells with Multiple Criteria

To count blank cells that meet a condition in another column, you can use SUMPRODUCT. For example, with data in A2:A20 and B2:B20, to count rows where A is blank (truly empty) and B equals “Yes”:

=SUMPRODUCT((A2:A20="")*(B2:B20="Yes"))

This works because A2:A20="" returns TRUE for truly blank cells (and also for empty strings, but that’s usually acceptable). If you want to exclude cells with empty strings, use ISBLANK(A2:A20) instead:

=SUMPRODUCT((ISBLANK(A2:A20))*(B2:B20="Yes"))

ISBLANK returns TRUE only for truly blank cells, not for empty strings. Note that SUMPRODUCT is an array-like function but works without Ctrl+Shift+Enter in modern Excel.

Common Pitfalls and Misconceptions

One common misconception is that COUNTIF(A1:A10,"") counts blank cells. It does not — it counts cells that contain an empty string, which is rarely what you want. Another pitfall is using "<>" to count non-blank cells, but forgetting that it counts cells with empty strings as non-blank. For example, if A1 contains =IF(1=1,"","x"), it returns an empty string, and COUNTIF(A1,"<>") returns 1, even though the cell appears blank.

Also, note that COUNTIFS with "=" counts only truly blank cells, but it does not count cells that contain a formula returning an empty string. If you want to count cells that are either truly blank OR have an empty string, you must use COUNTBLANK or SUMPRODUCT with "".

Alternatives: Using ISBLANK and FILTER

In Excel 365, you can use the FILTER function to extract blank rows and then count them. For example, to count rows where A is blank and B is “Yes”:

=ROWS(FILTER(A2:A20,(ISBLANK(A2:A20))*(B2:B20="Yes")))

This returns the number of rows that meet both criteria. ISBLANK ensures only truly blank cells are counted. If you want to include empty strings, replace ISBLANK(A2:A20) with (A2:A20=””).

Another alternative is to use the COUNTIFS function with a wildcard, but wildcards do not work with blank criteria. There is no direct way to use COUNTIFS to count truly blank cells without using "=" or a helper column.

Frequently Asked Questions

Does COUNTIFS count cells with formulas that return “”?

Yes, when you use the criterion "", COUNTIFS counts cells that contain an empty string, including those returned by formulas. It does not count truly blank cells. To count truly blank cells, use "=".

How do I count blank cells in a range with multiple criteria?

Use SUMPRODUCT with ISBLANK or "" combined with other conditions. For example, =SUMPRODUCT((ISBLANK(A2:A20))*(B2:B20="Yes")) counts truly blank cells in A where B is “Yes”.

What is the difference between COUNTBLANK and COUNTIF with “”?

COUNTBLANK counts both truly blank cells and cells with empty strings. COUNTIF with "" counts only cells with empty strings, not truly blank cells. So COUNTBLANK is usually more useful for visual blanks.

Why does my COUNTIFS formula return 0 when I use “”?

Because your cells are truly blank, not containing an empty string. Use "=" instead to count truly blank cells. If you want to count cells that look blank, use COUNTBLANK.

Can I use COUNTIFS to count non-blank cells?

Yes, use "<>" as the criterion. It counts cells that are not truly blank, but it also counts cells with empty strings. If you want to exclude empty strings, you need a more complex formula, like =SUMPRODUCT((A2:A20<>"")*(A2:A20<>"")) but that doesn’t work; instead use =COUNTA(A2:A20) which counts all non-empty cells, but it also counts empty strings. To exclude empty strings, use =SUMPRODUCT(--(A2:A20<>"")) but that still counts empty strings. The only way to exclude empty strings is to use =SUMPRODUCT((A2:A20<>"")*(NOT(ISBLANK(A2:A20))))? Actually, this is tricky. The simplest is to use =ROWS(A2:A20)-COUNTBLANK(A2:A20) which counts cells that are not visually blank, including those with empty strings. To count only cells with actual values (numbers/text), use =SUMPRODUCT(--(A2:A20<>"")) but that still counts empty strings. In practice, if you have empty strings, you may want to treat them as blank. So use COUNTBLANK to get visual blanks, and subtract from total.

Does COUNTIFS work the same in Google Sheets?

Yes, COUNTIFS in Google Sheets behaves the same way: "" counts empty strings, not truly blank cells. Use "=" for truly blank cells, and COUNTBLANK for visual blanks. The syntax is identical.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Formulas & functions

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.