Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

IF and COUNT in Excel '97

Apr 28, 2005 4:39AM PDT

Hi

I have numbers in cells b20:b50. The numbers are positive numbers ranging from 0 to infinity.

What I would like to do is count how many of the numbers are greater than 0.

I thought it might be a combiation of the IF and COUNT functions, but can't seem to get the formula to work.

Thanks for any help.

Jim

Discussion is locked

- Collapse -
You're almost there
Apr 28, 2005 5:00AM PDT

Using cell B51=COUNTIF(B20:B50,">0")

COUNTIF counts the number of cells, (not their contents), that meet the set criteria, in this case if the contents are greater than 0.

Mark

- Collapse -
countif
Apr 29, 2005 8:34AM PDT

Thanks for the help, works great.

Jim