COUNTBLANK()

Syntax. COUNTBLANK(area)

Definition. This function counts the empty cells in a cell range.

Arguments

Background. This function counts not only the empty cells but also the cells containing empty strings. Cells containing the value 0 are not counted. This function is related to the COUNTIF() function. However, the COUNTIF() function evaluates numbers and text differently.

Note

The COUNTBLANK() function is also included in Chapter 12.

Example. Perform a few tests to get familiar with this function. Assume cells B2 through B8 contain a, b, =””, nothing, 0, 1, and 2:

However, COUNTIF(B2:B8,"=""") returns 0, and COUNTIF(B2:B8,"=") returns the expected value 1, because cell B5 is empty.

Note

The entry =”” is rarely used, but an empty string can be the result of the IF() function.

See Also

COUNT(), COUNTA(), COUNTIF()