Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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~ |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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~ |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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~ |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=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~ |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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~ |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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~ |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem With Reference Update | Excel Worksheet Functions | |||
Problem with counting characters in a cell | Excel Worksheet Functions | |||
Copy an Drag cell Formula Problem | Excel Discussion (Misc queries) | |||
problem office assistant | Excel Discussion (Misc queries) | |||
problem adding | Excel Discussion (Misc queries) |