# Calculating the number of rows which have a certain criteria

Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

#### cowplopmorris

Hi,
Is there a way to print the number of rows of which their value in AG != 0?

I have a spreadsheet with a 'total' column, and I want to find how many rows do not have £0.00 as the result.

Any ideas?

Thanks.

#### cowplopmorris

It's OK, I sorted it.
In AH5, I put
Code:
``=IF(AG5=0;0;1)``
then filled it all the way down. I then did a sum at the bottom to find the total number of rows.

#### bomb #21

Hi,
Is there a way to print the number of rows of which their value in AG != 0?

I have a spreadsheet with a 'total' column, and I want to find how many rows do not have £0.00 as the result.

Any ideas?

Thanks.
Those are 2 different things.

Either way, you don't need formulas all the way down, you can do it with one.

=COUNTIF(AG:AG,0)

or

=COUNTIF(AG:AG,"<>"&0)

#### cowplopmorris

Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

As Seen On