Count cells that contain any text

blackWorX picture blackWorX · Sep 20, 2012 · Viewed 265.2k times · Source

I want to count the cells that contain anything within a range. Any cell that contain text, or numbers or something else should do a plus one in my result-cell.

I found this function,

countif(range; criteria)

but this doesn't work for me, because I don't know what to type in the criteria. How can I do this?

Answer

SwDevMan81 picture SwDevMan81 · Oct 5, 2012

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