Finding Current AND Longest Winning Streak based on TWO Criteria

SnKeaK

New Member
Joined
Oct 27, 2012
Messages
24
[TABLE="width: 363"]
<tbody>[TR]
[TD="colspan: 2"]Status[/TD]
[TD]Bookmaker[/TD]
[TD]Rating[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]Nitrogen Sports[/TD]
[TD]Pick of the Day[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Loss[/TD]
[TD]Nitrogen Sports[/TD]
[TD]Regular[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Day[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Loss[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Day[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
</tbody>[/TABLE]

Alright, So I am trying to find the current Win Streak for "Pick of the Day". n this example it'd be 3 because Column A = Win AND Column C = Pick of the Day. However if you look for the current streak of Pick of the Night, it'd only be 1. I need formula to find Current and another formula to find Longest streak given two criteria...Criteria being Column A = Win and Column C = Pick of the Day(for this example)

I figure I'd have to use MAX and Frequency combo but I can't figure out how to incorporate them based on if two criteria are met. Thanks.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Maybe...

=MAX(FREQUENCY(IF(A2:A7="Win",IF(C2:C7="Pick of the Day",ROW(A2:A7))),IF(A2:A7="Win",IF(C2:C7<>"Pick of the Day",ROW(A2:A7)))))
Ctrl+Shift+Enter

M.
 
Upvote 0
Just tested this out...That did it for the Longest Streak! Thank you! Could you try current streak as well?
 
Upvote 0
What is the current streak? Not clear for me. Examples...

M.
 
Last edited:
Upvote 0
Let's use the Pick of the Night as the example for this one. We'd be checking both columns - Column A for Win or Loss and Column C for "Pick of the Night". In the below example the current streak would be 0 due to Pick of the Night losing... (After typing this I realize why you needed more clarification, their was definitely more to it than I previously asked)

[TABLE="width: 363"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD="colspan: 2"]Win[/TD]
[TD]Nitrogen Sports[/TD]
[TD]Pick of the Day[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Loss[/TD]
[TD]Nitrogen Sports[/TD]
[TD]Regular[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Day[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Loss[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Day[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Loss[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Win[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night[/TD]
[/TR]
[TR]
[TD="colspan: 2"]Loss[/TD]
[TD]TRP Special[/TD]
[TD]Pick of the Night
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Maybe something like this

[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][td="bgcolor: #DCE6F1"]
H
[/td][td="bgcolor: #DCE6F1"]
I
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
Win​
[/td][td]
Nitrogen Sports​
[/td][td]
Pick of the Day​
[/td][td][/td][td]
Criteria1​
[/td][td]
Criteria2​
[/td][td]
DataLastRow​
[/td][td]
LastRow<>Criteria​
[/td][td]
Result​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
Loss​
[/td][td]
Nitrogen Sports​
[/td][td]
Regular​
[/td][td][/td][td]
Win​
[/td][td]
Pick of the Night​
[/td][td]
13​
[/td][td]
12​
[/td][td]
1​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Day​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
Loss​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Day​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td]
Loss​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
8
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
9
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
10
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
11
[/td][td]
Loss​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
12
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Day​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
13
[/td][td]
Win​
[/td][td]
TRP Special​
[/td][td]
Pick of the Night​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
14
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Criteria in E2:F2

Formula in G2 (gets last row with data)
=MATCH(REPT("z",255),A:A)

Formula in H2 (gets last row doesn't match criteria)
=LOOKUP(2,1/(((A2:A100<>E2)+(C2:C100<>F2))*(A2:A100<>"")),ROW(A$2:A$100))

Formula in I2
=COUNTIFS(INDEX(A:A,G2):INDEX(A:A,H2),E2,INDEX(C:C,G2):INDEX(C:C,H2),F2)

M.
 
Upvote 0
If there are no blank cells in the middle of your data you can use a simpler formula in I2
=G2-H2

M.
 
Last edited:
Upvote 0
In your example, If you change F2 to "Pick of the Day" ...I need the result to be 4 due to A1, A3, A5, and A12 all being winners AND being Pick of the Days... In your example, if you change F11 to Win, the result I'd be looking for is 5, due to Pick of the Night winning 5 times in a row
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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