Excel COUNTBLANK Function – Count Blank Cells in Excel

How to Use the COUNTBLANK Function in Excel

In this tutorial, you'll learn how to use the Excel COUNTBLANK function to count blank cells.

When you are managing data in Excel, such as the number of people who attended an event or took a test, there may come a time when you want to know how many people were absent.

In Excel, the COUNTBLANK function is a function that counts the number of blank cells that exist in a specified range. In other words, it is a function that can count the number of cells with no value entered.

How to count non-blank cells


The syntax of the COUNTBLANK() function is a follows:



  • range: The range from which you want to count the blank cells


  • Cells that contain numbers, text, and errors are not counted.
  • Cells with formulas that return empty text are considered blank and will be counted.
  • COUNTBLANK will not count the cells with zero value.

Excel COUNTBLANK Examples

Demo data:

1DateCodeNameQtyPrice ($)Amount ($)Employee
210/1/2019Item1001HP Desktop PC 13225675 
310/2/2019Item2001HP Desktop PC 227501500John
410/3/2019Item3001HP Laptop PC 32235470 
510/4/2019Item4001HP Laptop PC 437852355 

Example 1

The following example counts the number of cells in cells D2 through G5 and returns 3:


As you can see, there are 16 cells in D2 through G5, and three cells are blank.

Example 2

The following example counts the number of blank cells in column C in cells C2 through C5:


The above formula returns 0 because there is not an empty cell in the range.


In this tutorial, you've learned how to use the Excel COUNTBLANK function to count blank cells in Excel. With a few caveats, you can efficiently count blanks with the COUNTBLANK function.

Some functions allow you to restrict the count to some value (other than spaces) or "numbers. Depending on what you want to extract, you can use the many types of COUNT functions.

See also:
Excel ROUNDUP Function with Examples
Excel MIN Function with Examples
Excel COUNTA Function – Count Non-Blank Cells in Excel
Excel SUMIFS Function – Multiple Criteria
Excel COUNTIFS Function with Examples