![]() |
Counting problem
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~ |
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~ |
Counting problem
=IF(MIN(IF((A1:A20=0)*(A1:A20<""),ROW(A1:A20)))=0 ,ROWS(A1:A20),MIN(IF((A1:A
20=0)*(A1:A20<""),ROW(A1:A20)))) which is an array formula, it should be committed with Ctrl-Shift-Enter, not just Enter. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "daydreamin7" wrote in message ... 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~ |
Counting problem
I don't have any negative numbers, but sometimes when I hit F9 to randomize,
it shows N/A and says it has a problem calculating the MATCH part of the function. Any ideas? -- ~Laura~ "Ardus Petus" wrote: 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~ |
Counting problem
This formula won't change when I hit F9 to randomize it. I need the formula
to work when I change the numbers. -- ~Laura~ "Bob Phillips" wrote: =IF(MIN(IF((A1:A20=0)*(A1:A20<""),ROW(A1:A20)))=0 ,ROWS(A1:A20),MIN(IF((A1:A 20=0)*(A1:A20<""),ROW(A1:A20)))) which is an array formula, it should be committed with Ctrl-Shift-Enter, not just Enter. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "daydreamin7" wrote in message ... 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~ |
Counting problem
It changes fine for me. Did you array enter it?
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "daydreamin7" wrote in message ... This formula won't change when I hit F9 to randomize it. I need the formula to work when I change the numbers. -- ~Laura~ "Bob Phillips" wrote: =IF(MIN(IF((A1:A20=0)*(A1:A20<""),ROW(A1:A20)))=0 ,ROWS(A1:A20),MIN(IF((A1:A 20=0)*(A1:A20<""),ROW(A1:A20)))) which is an array formula, it should be committed with Ctrl-Shift-Enter, not just Enter. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "daydreamin7" wrote in message ... 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~ |
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? |
Counting problem
Yes! that did it! thank you so much, you just saved my operations management
grade! :) -- ~Laura~ "Domenic" wrote: 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? |
All times are GMT +1. The time now is 07:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com