You need to count the number of cells in a range, but you want to exclude the blank ones. The Excel COUNTIF function can do the job easily. Read on to find out how to use COUNTIF not blank in Excel, as well as count blank cells.
Excel COUNTIF cell is not blank syntax
Here is the COUNTIF syntax you should use to count not blank cells in Excel
"<>"– a logical operator which corresponds to the “not equal to” condition
Example of Excel formula COUNTIF not blank
For the following example of COUNTIF not blank Excel, we imported a query from BigQuery to Excel using Coupler.io. It’s a tool for integrating different sources, such as Google Sheets or Harvest to Excel.
Check out the available Excel integrations and try out Coupler.io for your project.
The imported range has a few blank cells.
You can easily count blank cells yourself, however, the number of non-blank cells is more difficult to calculate. This is why you should use the following COUNTIF Excel not blank formula:
The formula is very helpful if you need to count not blank cells in datasets that are much bigger than in our example. So, feel free to use it for your needs. Now, what about the blank cells, can you count them as well?
Opposite to COUNTIF Excel not blank – formula to calculate blank cells
If you replace the logical operator of the Excel COUNTIF not blank formula with
"", you can count the number of blank cells in a range:
Let’s see how it looks in our example dataset:
Although this formula works pretty well, the Excel creators decided to provide a dedicated function to count blank cells – COUNTBLANK.
Excel COUNTBLANK to count the number of blank cells
COUNTBLANK counts the number of empty cells in a given range. Here is the syntax:
In our example, the formula will look as follows:
Why count blank or not blank cells?
The above mentioned functions are Statistical functions in Excel. They are widely used in statistical analysis and other data manipulation to increase the accuracy of the outcome. Good luck with your data!Back to Blog