This tutorial will demonstrate how to count blank and non-blank cells in Excel and Google Sheets.

count non blank cells title

COUNTA Function

The COUNTA Function counts all non-blank cells.

=COUNTA(Range)

count non blank cells counta function

COUNTIF Function to Count All Non-Blank Cells

You can also use the COUNTIF function to count non-blank cells. The COUNTIF function counts all values that meet certain criteria.

Here we will enter in the criteria of “*”. The * (astericks) is a wildcard card character that represents any number of any characters (so any non-blank cell).

=COUNTIF(Range, “*”)

count non blank cells countif function

COUNTBLANK Function to Count All Blank Cells

The COUNTBLANK function counts all cells that are blank.

=COUNTBLANK(Range)

count non blank cells countblank

Please keep in mind that if the cell has a value of 0, it will pick it up as non-blank.

Count Blank and Non-Blank Cells in Google Sheets

The formulas work in exactly the same way in Google Sheets. To demonstrate, see the examples below.

Count Non-Blank Cells in Google Sheets

count non blank cells counta google sheets

or

count non blank cells countif google sheets

Count Blank Cells in Google Sheets

count non blank cells countblank google sheets