This post is going to show you a number of ways where you can count rows with values in Google Sheets.
Using COUNTA
If you need to count the number of rows based on only one column, you can use the COUNTA
function.
=COUNTA(A:A)
In the above example, it will count the number of rows that has value in column A.
Using COUNTIFS
If you need to count rows with values based on multiple columns, then you can use the COUNTIF
function.
=COUNTIFS( A:A,"<>",B:B, "<>")
In this example, it will only count the rows if both Column A and B has values in it.
How to count only rows with specified text?
You can also easily do so using COUNTIFS
.
=COUNTIFS(A:A, "Apple")
In this example, it will only count the rows if cell equals to Apple. You can see that it has omitted “Banana and Apple”.
If you want to include rows that contains the specified text, you can do so by adding *
before and after the specified text.
=COUNTIFS(A:A, "*Apple*")
In this example, it will include rows where cell equals and also cells that contains the specified text.
The *
adds as a wildcard text for anything before or after the word “Apple”.
Hopefully, this simple guide on how to count only rows with values in Google Sheets will help you out.