Hi All, I have a large workbook that involves all the matches of Northampton Town FC. On the worksheet I have a cell (W1) that you can put however many matches you like and you can see how many points have been gained from those most recent matches (current form). This works fine.
In W5 I have for League matches only
=SUMPRODUCT(COUNTIFS(INDEX(ALL!K:K,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>"")*(ALL!$J:$J=$V$5),),$W$1)):ALL!$K$9999,{"W","D"},INDEX(ALL!J:J,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>"")*(ALL!$J:$J=$V$5),),$W$1)):ALL!$J$9999,$V$5),{3,1})
In W7 I have for all matches
=SUMPRODUCT(COUNTIFS(INDEX(ALL!K:K,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>""),),$W$1)):ALL!$K$9999,{"W","D"},INDEX(ALL!J:J,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>""),),$W$1)):ALL!$J$9999,$V$5),{3,1})
Now somebody several years ago placed VBA on the worksheet that would look back to find the last time the most recent sequence was either better or worse (and other things). This was very useful but sadly it went awry and I don't don't understand VBA and now its disappeared altogether. So what I'm wondering is whether I could put a formula in a cell to do the same job?
So just to reiterate, if the club in its last 5 games had just won its last 4 league games and drawn another = 13pts, the formula would look for the previous sequence of 5 games when that was bettered (that could only be 5 wins).
Alternatively if the club was in a slump and in its last 5 games it had lost 4 and drawn 1 = 1pt, it would look for the last time the club did worse than that which would have to be 5 sequential defeats = 0pts.
Now all this makes sense to me when I read it back but I'm guessing it wont make any sense to anyone else. My question is, it it possible to do this with a formula?
In W5 I have for League matches only
=SUMPRODUCT(COUNTIFS(INDEX(ALL!K:K,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>"")*(ALL!$J:$J=$V$5),),$W$1)):ALL!$K$9999,{"W","D"},INDEX(ALL!J:J,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>"")*(ALL!$J:$J=$V$5),),$W$1)):ALL!$J$9999,$V$5),{3,1})
In W7 I have for all matches
=SUMPRODUCT(COUNTIFS(INDEX(ALL!K:K,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>""),),$W$1)):ALL!$K$9999,{"W","D"},INDEX(ALL!J:J,LARGE(INDEX(ROW(ALL!$K:$K)*(ALL!$K:$K<>""),),$W$1)):ALL!$J$9999,$V$5),{3,1})
Now somebody several years ago placed VBA on the worksheet that would look back to find the last time the most recent sequence was either better or worse (and other things). This was very useful but sadly it went awry and I don't don't understand VBA and now its disappeared altogether. So what I'm wondering is whether I could put a formula in a cell to do the same job?
So just to reiterate, if the club in its last 5 games had just won its last 4 league games and drawn another = 13pts, the formula would look for the previous sequence of 5 games when that was bettered (that could only be 5 wins).
Alternatively if the club was in a slump and in its last 5 games it had lost 4 and drawn 1 = 1pt, it would look for the last time the club did worse than that which would have to be 5 sequential defeats = 0pts.
Now all this makes sense to me when I read it back but I'm guessing it wont make any sense to anyone else. My question is, it it possible to do this with a formula?