Calculate longest unbeaten/winless streak in excel

HawkeyeBC

New Member
Joined
Mar 29, 2023
Messages
9
Office Version
  1. 2021
Platform
  1. Windows
I have a sheet that is tracking win, loss, and ties for a fantasy baseball team. I am trying to display the longest winning, losing, and unbeaten/winless streak.

For the win streak, I used the array {=MAX(FREQUENCY(IF(A2:A10="W",ROW(A2:A10)),IF(A2:A10<>"W",ROW(A2:A10))))] where column A is where the W/L/T is tracked.

How would I add in "T" to the formula so that the ties count toward the unbeaten streak? In the sample below, the longest winning streak should be 3, the longest losing streak should be 2, and the longest unbeaten streak should be 4. I am trying to avoid using a helper column but would do it if it makes things easier.

W
W
W
T
L
L
W
T
W
W
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Book1
ABC
1W
2W3Current formula
3W
4T4W or T (therefore not L)
5L
6L2Losing streak
7W
8T
9W
10W
11
Sheet2
Cell Formulas
RangeFormula
B2B2=MAX(FREQUENCY(IF($A$1:$A$10="W",ROW($A$1:$A$10)),IF($A$1:$A$10<>"W",ROW($A$1:$A$10))))
B4B4=MAX(FREQUENCY(IF($A$1:$A$10<>"L",ROW($A$1:$A$10)),IF($A$1:$A$10="L",ROW($A$1:$A$10))))
B6B6=MAX(FREQUENCY(IF($A$1:$A$10="L",ROW($A$1:$A$10)),IF($A$1:$A$10<>"L",ROW($A$1:$A$10))))
 
Upvote 0
Book1
ABC
1W
2W3Current formula
3W
4T4W or T (therefore not L)
5L
6L2Losing streak
7W
8T
9W
10W
11
Sheet2
Cell Formulas
RangeFormula
B2B2=MAX(FREQUENCY(IF($A$1:$A$10="W",ROW($A$1:$A$10)),IF($A$1:$A$10<>"W",ROW($A$1:$A$10))))
B4B4=MAX(FREQUENCY(IF($A$1:$A$10<>"L",ROW($A$1:$A$10)),IF($A$1:$A$10="L",ROW($A$1:$A$10))))
B6B6=MAX(FREQUENCY(IF($A$1:$A$10="L",ROW($A$1:$A$10)),IF($A$1:$A$10<>"L",ROW($A$1:$A$10))))
Amazing! It totally worked! Thank you so much
 
Upvote 0
For the middle part (W or T)...what if I wanted to ignore blank cells? I want to omit those from being counted until there is something entered into the cell.
 
Upvote 0
For the middle part (W or T)...what if I wanted to ignore blank cells? I want to omit those from being counted until there is something entered into the cell.
1680145886920.png


It's counting the blank cells as "Not L" for the unbeaten streak formula. How would I omit those until there is data entered?
 
Upvote 0
skm95.xlsx
ABC
1W
2W3Current formula* ADJUSTED
3
4W
5T4W or T (therefore not L)
6L
7L2Losing streak
8W
9T
10W
11W
Sheet2
Cell Formulas
RangeFormula
B2B2=MAX(FREQUENCY(IF(($A$1:$A$11="W")*($A$1:$A$11<>""),ROW($A$1:$A$11)),IF(($A$1:$A$11<>"W")*($A$1:$A$11<>""),ROW($A$1:$A$11))))
B5B5=MAX(FREQUENCY(IF(($A$1:$A$11<>"L")*($A$1:$A$11<>""),ROW($A$1:$A$11)),IF(($A$1:$A$11="L")*($A$1:$A$11<>""),ROW($A$1:$A$11))))
B7B7=MAX(FREQUENCY(IF(($A$1:$A$11="L")*($A$1:$A$11<>""),ROW($A$1:$A$11)),IF(($A$1:$A$11<>"L")*($A$1:$A$11<>""),ROW($A$1:$A$11))))
 
Upvote 0

Forum statistics

Threads
1,214,922
Messages
6,122,281
Members
449,075
Latest member
staticfluids

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