COUNTBLANK Function

Counts the number of empty cells in a given range of cells

Over 1.8 million professionals use CFI to learn accounting, financial analysis, modeling and more. Start with a free account to explore 20+ always-free courses and hundreds of finance templates and cheat sheets.

What is the COUNTBLANK Function?

The COUNTBLANK Function[1] is categorized under Excel STATISTICAL functions. COUNTBLANK will count the number of empty cells in a given range of cells.

In financial analysis, the function can be useful in highlighting or counting empty cells in a given range.

Formula

=COUNTBLANK(range)

Where:

  1. Range specifies the range of cells in which we want to count blank cells.

For the COUNTBLANK function, remember that:

  • Any cells that contain text, numbers, errors, etc. are not counted by this function.
  • Formulas that return empty text (“”) are considered blank and will be counted. So, if a cell contains an empty text string or a formula that returns an empty text string, the cell is counted as blank by the COUNTBLANK function.
  • Cells that contain zero are considered not blank and will not be counted.

How to use the COUNTBLANK Function in Excel?

As a worksheet function, COUNTBLANK can be entered as part of a formula in a cell of a worksheet. To understand the uses of the function, let us consider an example:

Worked Example of COUNTBLANK

If we wish to know the number of cells that are empty, we can use conditional formatting with this function.

Suppose we are given the data below:

COUNTBLANK Function

Here, we can use the formula =COUNTBLANK(A2:D5) to count the empty rows:

COUNTBLANK Function - Example 1

We get the results below:

COUNTBLANK Function - Example 1a

If we want, we can use conditional formatting to highlight rows with empty cells using the COUNTBLANK function. Select the desired range, and on the select conditional formatting and apply the COUNTBLANK() function. This will then highlight all the cells that are Blank on the desired range.

Click here to download the sample Excel file

Additional Resources

Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial modeling and analysis. To learn more, check out these additional CFI resources:

Article Sources

  1. COUNTBLANK Function
0 search results for ‘