View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Counting problem

Assuming that A2:A100 contains your numbers, try...

=IF(COUNTIF(A2:A100,0),COUNTIF(A2:INDEX(A2:A100,MA TCH(0,A2:A100,0)),"0")
,COUNTIF(A2:A100,"0"))

Hope this helps!

In article ,
"daydreamin7" wrote:

I am trying to find a way to count cells in a range, I want them to count
numbers greater than 0. But when I hit the first 0 (I have it on
randomization), I want it to stop counting... because the game is over for
the simulation I'm dong. Any ideas what I can do?