tech on the net

MS Excel: COUNTBLANK Function (WS)

In Microsoft Excel, the COUNTBLANK function counts the number of empty cells in a range.

Syntax

The syntax for the COUNTBLANK function is:

COUNTBLANK( range )

range is the range of cells to count empty cells.

Applies To

Type of Function

Worksheet Function Example

Let's take a look at an example to see how you would use the COUNTBLANK function in a worksheet:

Microsoft Excel

Based on the Excel spreadsheet above, the COUNTBLANK function would return the following:

=COUNTBLANK(A1:A4) would return 1
=COUNTBLANK(A1:A6) would return 3
=COUNTBLANK(A1:B4) would return 3