Use the COUNTBLANK function, one of the Statistical functions, to count the number of empty cells in a range of cells.
Syntax
COUNTBLANK(range)
The COUNTBLANK function syntax has the following arguments:
-
Range Required. The range from which you want to count the blank cells.
Remark
Cells with formulas that return "" (empty text) are also counted. Cells with zero values are not counted.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet.
Data |
Data |
|
---|---|---|
6 |
||
27 |
||
4 |
34 |
|
Formula |
Description |
Result |
=COUNTBLANK(A2:B4) |
Counts empty cells in the range above. |
2 |
Note: Copying from some browsers may add an apostrophe to the beginning of the formula when it's pasted in Excel. If the formula does not show a result, select that cell, press F2, delete the apostrophe, and then press Enter.
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.
See Also
Find and correct errors in formulas
Excel keyboard shortcuts and function keys