count number of cells not empty sheets code example
Example 1: google sheets how to count all non empty cells
# Basic syntax:
=COUNTA(range)
# Example usage:
=COUNTA(A1:B26)
Example 2: excel count non empty cells
=COUNTA(B5:B9) ' NOT BLANK cells
=COUNTIF(B5:B9,"<>") ' other way
=COUNTBLANK(B5:B9) ' BLANK cells