Counting 'up' rows instead of down

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!
 
L

Luke M

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top