This example shows you how to count the number of blank and nonblank cells in Excel.

Use the COUNTA function to count only cells in a range that contain values.

When you count cells, sometimes you want to ignore any blank cells because only cells with values are meaningful to you. For example, you want to count the total number of salespeople who made a sale (column D).

COUNTA ignores the blank values in D3, D4, D8, and D11, and counts only the cells containing values in column D. The function finds six cells in column D containing values and displays 6 as the output.


1. The COUNTBLANK function counts the number of blank cells.

2. The COUNTA function counts the number of nonblank cells. COUNTA stands for count all.