View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Antonio Antonio is offline
external usenet poster
 
Posts: 134
Default Count after given condition is met

This is the result I obtain
1 2 3 4 5 6
0 0 0 0 0 0
4 30 30 30 30 30 30
2 9 9 9 9 9 9
2 8 8 8 8 8 8
3 5 5 5 5 5 5
2 0 0 0 0 0 0
2
4
3
2
4
3
2
4
2
4
4
2
4
4
2
5
3
2
2
3
5
2
2
2
2
3
2
2
2
2
2
2
2
2
2
2
5
2
5
2
3
2
3
5
2
2
3
















































































































































































































































"Billy Liddel" wrote:

I thought that the numbers went up to just six. Just copy the formula down to
include the highest number in the range.

Peter

"Antonio" wrote:

Hi Billy

With the formula, I obtain the total quantity of numbers, but not
how many after occurence 1, 2, 3, 4, 5 or 6.

What M I doing wrong??

Tks for the help

"Billy Liddel" wrote:

Sumproduct will do this. Assuming that your data is is C1:c23 enter this
formula in Row 1 and copy down to row 6

=SUMPRODUCT(--($C$1:$C$23=ROW()))

If you want a header in row 1 and your summary to begin in row 2 use:

=SUMPRODUCT(--($C$1:$C$23=ROW()-1))

Regards
Peter

"Antonio" wrote:

Hi all

would like your help for the following

Need to count which and how many numbers appear after a given number

ie
After After After After After After
1 2 3 4 5 6
1
2 1 1
3 1 1 1 1
4 1 2 3 1 1
5 2 1
6 1

this was obtained from data on column c, that is displayed as follows:
3
5
4
5
3
4
4
2
4
3
4
4
3
5
6
4
4
3
3
4
2
3
2

Tks in advance
Antonio