Count the number of cells that are not empty in specified range(s)

Syntax of Excel COUNTA formula:

In words:
=Count the number of cells not empty (in this range,[this range], and any other range specified…)

Examples of COUNTA formula

Consider the following example:

excel vdb

Putting this formula:

=COUNT(A1:B9) gives 15 as out of the total range all cells are occupied except three. With 9 cells in column A and 9 in column B it makes 18 and only three 3 empty it makes up 18-3 = 15