Count cells that are blank
Generic formula
=COUNTBLANK(range)
Explanation
To count the number of cells that are blank, you can use the COUNTBLANK function. In the example shown, the formula in cell E5 is:
=COUNTBLANK(B5:B14)
Because there are two empty cells in the range, COUNTBLANK returns 2
How this formula works
The COUNTBLANK function 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. COUNTBLANK is fully automatic. Just pass in a range, and COUNTBLANK will return a result. In the example shown, the formula in E5 is:
=COUNTBLANK(B5:B14) // returns 2
Because there are two empty cells in the range, COUNTBLANK returns 2.
Count not blank
To count cells that are not blank, you can use the COUNTA function. The formula in E6 is:
=COUNTA(B5:B14) // returns 8