Looking for a macro that will take a column of W and Ls (as in the code or pic below) and count the length of each streak and place in the win/loss columns below last streak that was entered.
1st streak = 2 and is for L so C2 will have a 2 entered.
2nd streak = 1 and is for W so B2 will have a 1 entered.
3rd streak = 2 and is for L so C3 will have a 2 entered since C2 already has a value in it.
4th streak = 1 and is for W so B3 will have a 1 entered since B2 already has a value in it.
5th streak = 1 and is for L so C4 will have a 1 entered since C3 already has a value in it.
6th streak = 4 and is for W so B4 will have a 4 entered since B3 already has a value in it... and so on.
Thank you.
Note: Column A can contain data down to A100000
(Time for me to learn how to write a macro by seeing one that works)
(Highlighted L in yellow is just for show)
1st streak = 2 and is for L so C2 will have a 2 entered.
2nd streak = 1 and is for W so B2 will have a 1 entered.
3rd streak = 2 and is for L so C3 will have a 2 entered since C2 already has a value in it.
4th streak = 1 and is for W so B3 will have a 1 entered since B2 already has a value in it.
5th streak = 1 and is for L so C4 will have a 1 entered since C3 already has a value in it.
6th streak = 4 and is for W so B4 will have a 4 entered since B3 already has a value in it... and so on.
Thank you.
Note: Column A can contain data down to A100000
(Time for me to learn how to write a macro by seeing one that works)
Code:
result win lose
L 1 2
L 1 2
W 4 1
L 1 3
L 7 2
W 2 1
L 1 1
W
W
W
W
L
L
L
W
L
L
W
W
W
W
W
W
W
L
W
W
L
W
Last edited: