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

Do you have any numbers < 0 (negative)?
if not,
=IF(ISNA(MATCH(0,A2:A999,0),ROWS(A2:A999),MATCH(0, A2:A999))
will return the count of non-zero numbers before you hit 0 or end-of-list.

HTH
--
AP

"daydreamin7" a écrit dans le
message de ...
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?
--
Thanks,
~Laura~