View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Billy Liddel Billy Liddel is offline
external usenet poster
 
Posts: 527
Default Count after given condition is met

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