I hope you do enjoy this free blog. I only ask one thing from you in return, click in one of the ads

Tuesday, 31 March 2015

COUNTIF tips

The COUNTIF function can provide us with very useful information. From a range you can count empty cells, the non-empty cells, or cells with all text. Let us see it with an example.






Having a range B2:B9 with the values shown above, we will perform various calculations.



Calculate the empty cells


Sometimes we need to calculate the cells that are empty or have no value. To achieve that we could use the following formulas:

=COUNTIF(B2:B9,"=") = 1

=COUNTIF(B2:B9,"") = 1

And also we could use the COUNTBLANK function

=COUNTBLANK(B2:B9) = 1



Calculate the cells that are text


Sometimes we need to see which are the cells that being non empty have only text values. To achieve that we could use the following formulas:

=COUNTIF(B2:B9,"><") = 3

=COUNTIF(B2:B9,"*") = 3



Calculate the nonblank cells


Sometimes we need to see which are the cells aren't empty. To achieve that we could use the following formulas:


=COUNTIF(B2:B9,"<>") = 7

And we could also use the COUNTA function.

=COUNTA(B2:B9) = 7





Do you know any more? Could you please share them in the comments?




Download the example file

To download a file containing examples of the theme we have just covered click on the following link:


Subscribe and get all entries via email


You can do it by providing your email into "Join the newsletter" box in the right sidebar.


Or follow me via Social Media


No comments:

Post a Comment