Counting 'up' rows instead of down

  • Thread starter Thread starter lawandgrace
  • Start date Start date
L

lawandgrace

I have a series of rows that show W's (wins) and L's (Losses) from baseball
tournaments.

Example:
W
W
L
L
W
W
W
L
W
W
L

What formula can I use to count from the bottom up, counting only the most
recent W's near the bottom, ending the count at the first L to show the most
recent winning streak (in this case, it would show "2").

Thanks!
 
Are you wanting a formula to be copied down, or a single formula?

Copy-down style:
In B2:
=IF(A2="W",B1+1,0)

Single formula:
Start with above style, and we will then hide that column. Single output
formula array* producing last win streak is then:
=INDEX(B:B,MAX(IF(B2:B10<>0,ROW(B2:B10))))

Note that this formula must be confirmed using Ctrl+Shift+Enter, not just
Enter.
 
Back
Top