Count "0" after all specific numbers

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,362
Office Version
  1. 2010
</SPAN></SPAN>Hello,</SPAN></SPAN>

I am looking a specific solution for my need, Count "0" after all specific numbers are listed in cells F5:F24 and result of count show in the cells G5:G24 as shown in the example below...</SPAN></SPAN>

In the data Column D number of sequence is broken by 0's (some time after 1, some time after 2...and so on) I need to count 0's after each sequence has come up (to make example clearer I have filled a different coloured for the last number of each sequence) </SPAN></SPAN>

Here is an example.... with results</SPAN></SPAN>


Book1
ABCDEFG
1
2
3
4n1Count "0" AfterCount Result
5013
6122
7031
8141
9253
10360
11470
12580
13690
148100
159110
1611121
1712130
180140
190150
202160
210171
220180
231190
242200
254
265
270
280
290
301
312
324
330
342
353
364
375
380
390
401
410
421
432
443
454
465
476
487
499
5010
5111
5212
5314
5416
5517
560
571
582
593
600
610
622
630
641
650
661
672
683
694
705
710
721
Sheet1


Thanks In Advance </SPAN></SPAN>
Using version 2000</SPAN></SPAN>

Regards,</SPAN></SPAN>
Moti</SPAN>
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
D​
F​
G​
H​
4​
n1
Count "0" After
Count Result
5​
0​
1​
3​
G5: =COUNTIFS(D5:D71,F5, D6:D72, 0)
6​
1​
2​
2​
7​
0​
3​
1​
8​
1​
4​
1​
9​
2​
5​
3​
10​
3​
6​
0​
11​
4​
7​
0​
12​
5​
8​
0​
13​
6​
9​
0​
14​
8​
10​
0​
15​
9​
11​
0​
16​
11​
12​
1​
17​
12​
13​
0​
18​
0​
14​
0​
19​
0​
15​
0​
20​
2​
16​
0​
21​
0​
17​
1​
22​
0​
18​
0​
23​
1​
19​
0​
24​
2​
20​
0​
25​
4​
26​
5​
27​
0​
28​
0​
29​
0​
30​
1​
31​
2​
32​
4​
33​
0​
34​
2​
35​
3​
36​
4​
37​
5​
38​
0​
39​
0​
40​
1​
41​
0​
42​
1​
43​
2​
44​
3​
45​
4​
46​
5​
47​
6​
48​
7​
49​
9​
50​
10​
51​
11​
52​
12​
53​
14​
54​
16​
55​
17​
56​
0​
57​
1​
58​
2​
59​
3​
60​
0​
61​
0​
62​
2​
63​
0​
64​
1​
65​
0​
66​
1​
67​
2​
68​
3​
69​
4​
70​
5​
71​
0​
72​
1​
 
Upvote 0
G5: =COUNTIFS(D5:D71,F5, D6:D72, 0)
Thank you shg, for your prompt replay unfortunately in my older version 2000 Function "COUNTIFS" does not works</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Moti
</SPAN></SPAN>
 
Upvote 0
=sumproduct((D5:D71 = F5) * (D6:D72 = 0))
shg, with this formula I got requested result Perfect! </SPAN></SPAN>

Thank you for your kind help
</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Moti :)
</SPAN></SPAN>
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top