Count number of cells with any value (string or number) in a column in Google Docs Spreadsheet

steakpi picture steakpi · Feb 7, 2014 · Viewed 105.8k times · Source

I have several columns in Google Spreadsheet.

I would like to count how many cells have a value (number or string) and display that number at the top of the column.

For example:


Hello
World
123
Some string


The above column would give me the answer of "4"

I have not managed to find a formula that does this.

Answer

Stryder picture Stryder · Feb 7, 2014

In the cell you want your result to appear, use the following formula:

=COUNTIF(A1:A200,"<>")

That will count all cells which have a value and ignore all empty cells in the range of A1 to A200.