Count cells that contain any text
COUNTIF function will only count cells that contain numbers in your specified range.
COUNTA(range) will count all values in the list of arguments. Text entries and numbers are counted, even when they contain an empty string of length 0.
Example: Function in A7 =COUNTA(A1:A6)
Range:
A1 a
A2 b
A3 banana
A4 42
A5
A6
A7 4 -> result
Google spreadsheet function list contains a list of all available functions for future reference https://support.google.com/drive/table/25273?hl=en.
You can pass "<>"
(including the quotes) as the parameter for criteria
. This basically says, as long as its not empty/blank, count it. I believe this is what you want.
=COUNTIF(A1:A10, "<>")
Otherwise you can use CountA
as Scott suggests
The criterium should be "?*"
and not "<>"
because the latter will also count formulas that contain empty results, like ""
So the simplest formula would be
=COUNTIF(Range,"?*")