# Count cells that are blank

=COUNTBLANK(rng)

To count the number of cells that are blank, you can use the COUNTBLANK function. In the generic form of the formula (above) rng represents a range of cells.

In the example, the active cell contains this formula:

=COUNTBLANK(B4:B8)

**How this formula works**

COUNTIF counts the number of cells in the range that don't contain any value and returns this number as the result. Cells that contain text, numbers, dates, errors, etc. are not counted.

You can easily count cells that are __not__ blank using COUNTA function with the same range like so:

=COUNTA(B4:B8)

## Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.