View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
bigwheel
 
Posts: n/a
Default trying to make a formula for percent if greater than a value

You need to use COUNT for the number of cells and COUNTIF for those
containing values greater than zero. i.e. =COUNT(A1:A10) will result in 10.
If, say, three of those cells contain zero, =COUNTIF(A1:A10,"0") will result
in 7

If I understand the question correctly, your desired calculation would
therefore be 7/10 or =COUNTIF(A1:A10,"0")/COUNT(A1:A10)

"cervenyc" wrote:

I am trying to create a formula that will calculate percent survival.
Basically I have data in cells and I want to make a fomula that tests if
there is a value greater than 0. I want my answer to be not the values in the
box, but the number of cells with data greater than zero divided by the total
number of cells.

Then, I'd like to write another formula to average the values in those
cells, but only if those cells have a value greater than zero. Can anyone
help?