Establishing a streak of non-numerical values.

HockeyBoi

New Member
Joined
May 21, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hey team,

I'm trying to establish a Win, Loss, or Tie streak for sports games.

In the example below, I'd like the "Streak" coloum to automatically generate the streak based on the values in subsequent columns. For instance, Team 1 would have a streak of W4, Team two would have a streak of T1, and then W1, L1, L2, W4...so on and so forth.

I've tried all sorts of variations but can't get it to perform properly. I could easily do it manually...but automation is more fun until this stumped me.

Any ideas?

TeamStreakGame 1Game 2Game 3Game 4Game 5
1WWWW
2WLWT
3LTLW
4WLTL
5LTLL
6WWWW
7WWWL
8LTWL
9TLLL
10LLLW
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
If I understand, you're counting winning streak. For any other streak, replace "W" with the corresponding letter. Try:
Book1
ABCDEFG
1TeamStreakGame 1Game 2Game 3Game 4Game 5
214WWWW
321WLWT
431LTLW
541WLTL
650LTLL
764WWWW
873WWWL
981LTWL
1090TLLL
11101LLLW
Sheet1
Cell Formulas
RangeFormula
B2:B11B2=MAX(SCAN(0,C2:F2,LAMBDA(a,b,IF(b="W",a+1,0))))
 
Last edited:
Upvote 0
Another option:

Book1
ABCDEFG
1TeamStreakGame 1Game 2Game 3Game 4Game 5
214WWWWW
321TWLWT
431WLTLW
541LWLTL
652LLTLL
764WWWWW
871LWWWL
981LLTWL
1093LTLLL
11101WLLLW
Sheet2
Cell Formulas
RangeFormula
B2:B11B2=LET(s,CONCAT(C2:H2),c,SEQUENCE(LEN(s)),r,RIGHT(s),m,MAX(IF(MID(s,c,1)<>r,c)),LEN(s)-m&r)


This finds the current active streak.
 
Upvote 0
Solution
It appears I've misunderstood the OP. Second attempt.
Book1
ABCDEFG
1TeamStreakGame 1Game 2Game 3Game 4Game 5
21W4WWWW
32T1WLWT
43W1LTLW
54L1WLTL
65L2LTLL
76W4WWWW
87L1WWWL
98L1LTWL
109L3TLLL
1110W1LLLW
Sheet1
Cell Formulas
RangeFormula
B2:B11B2=F2&MAX(SCAN(0,C2:F2,LAMBDA(a,b,IF(b=F2,a+1,0))))
 
Upvote 0
Or:

=LET(s,CONCAT(C2:H2),c,SEQUENCE(LEN(s)),r,RIGHT(s),MAX(IF(REPT(r,c)=RIGHT(s,c),c))&r)
 
Upvote 0
Another option:

Book1
ABCDEFG
1TeamStreakGame 1Game 2Game 3Game 4Game 5
214WWWWW
321TWLWT
431WLTLW
541LWLTL
652LLTLL
764WWWWW
871LWWWL
981LLTWL
1093LTLLL
11101WLLLW
Sheet2
Cell Formulas
RangeFormula
B2:B11B2=LET(s,CONCAT(C2:H2),c,SEQUENCE(LEN(s)),r,RIGHT(s),m,MAX(IF(MID(s,c,1)<>r,c)),LEN(s)-m&r)


This finds the current active streak.
This seemed to work really well in Office 365. Thank you so much!

Would you know how to get similar results in Excel 2016 for Mac?
 
Upvote 0
Would you know how to get similar results in Excel 2016 for Mac?

To be perfectly honest, I'm not sure. I don't know what functions are available to Excel 2016 for Mac, the online documentation is sparse. But I did come up with a formula using older functions that might work.

Book1
ABCDEFGH
1TeamStreakGame 1Game 2Game 3Game 4Game 5
214WWWWW
321TWLWT
432WLTLWW
541LWLTL
652LLTLL
764WWWWW
871LWWWL
981LLTWL
1093LTLLL
11101WLLLW
Sheet2
Cell Formulas
RangeFormula
B2:B11B2=(COUNTA(C2:H2)-MAX((COLUMN(C2:H2)-COLUMN(C2)+1)*(C2:H2<>LOOKUP(2,1/(C2:H2<>""),C2:H2))*(C2:H2<>"")))&LOOKUP(2,1/(C2:H2<>""),C2:H2)
Press CTRL+SHIFT+ENTER to enter array formulas.


You'll probably need to use Control+Shift+Enter when entering the formula in the formula bar.
 
Upvote 0
To be perfectly honest, I'm not sure. I don't know what functions are available to Excel 2016 for Mac, the online documentation is sparse. But I did come up with a formula using older functions that might work.

Book1
ABCDEFGH
1TeamStreakGame 1Game 2Game 3Game 4Game 5
214WWWWW
321TWLWT
432WLTLWW
541LWLTL
652LLTLL
764WWWWW
871LWWWL
981LLTWL
1093LTLLL
11101WLLLW
Sheet2
Cell Formulas
RangeFormula
B2:B11B2=(COUNTA(C2:H2)-MAX((COLUMN(C2:H2)-COLUMN(C2)+1)*(C2:H2<>LOOKUP(2,1/(C2:H2<>""),C2:H2))*(C2:H2<>"")))&LOOKUP(2,1/(C2:H2<>""),C2:H2)
Press CTRL+SHIFT+ENTER to enter array formulas.


You'll probably need to use Control+Shift+Enter when entering the formula in the formula bar.
You're a wizard - cheers for that!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top