Longest Winning Streak

broncos347

Active Member
Joined
Feb 16, 2005
Messages
293
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet where I track horse races. I have one column where I track wins and losses. Is there a formula which will tell you what is the current longest winning streak or losing streak?
 
Assuming that A2:A100 contains the data, and that a win and a loss are recorded as W and L, respectively, try...

=MAX(FREQUENCY(IF(A2:A100="W",ROW(A2:A100)),IF(A2:A100<>"W",ROW(A2:A100))))

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!
 
Upvote 0
Assuming that A2:A100 contains the data, and that a win and a loss are recorded as W and L, respectively, try...

=MAX(FREQUENCY(IF(A2:A100="W",ROW(A2:A100)),IF(A2:A100<>"W",ROW(A2:A100))))

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

Hope this helps!

Question: I need a winning streak formula for currency trades, I changed the "w" to >0 but result comes back a 1, when the longest streak of positive numbers is 6?
 
Upvote 0
Question: I need a winning streak formula for currency trades, I changed the "w" to >0 but result comes back a 1, when the longest streak of positive numbers is 6?

Control+shift+enter:

=MAX(FREQUENCY(IF(A2:A100>0,ROW(A2:A100)),IF(A2:A100<=0,ROW(A2:A100))))

Equally...

=MAX(FREQUENCY(IF(SIGN(A2:A100)=1,ROW(A2:A100)),IF(1-(SIGN(A2:A100)=1),ROW(A2:A100))))
 
Upvote 0
Ok I've tried the first formula, maybe my problem is my data is on another worksheet in this workbook here is what I have doesn't work but here it is

=MAX(FREQUENCY(IF(alveo statsP2:P3548>0,ROW(alveo statsP2:P3548)),IF(alveo statsP2:P3548<=0,ROW(alveo statsP2:P3548))))

I keep getting #name, or #ref, or #value errors each coming when I try to fix what I think is wrong, then I get another error.

Thanks
 
Upvote 0
Ok I've tried the first formula, maybe my problem is my data is on another worksheet in this workbook here is what I have doesn't work but here it is

=MAX(FREQUENCY(IF(alveo statsP2:P3548>0,ROW(alveo statsP2:P3548)),IF(alveo statsP2:P3548<=0,ROW(alveo statsP2:P3548))))

I keep getting #name, or #ref, or #value errors each coming when I try to fix what I think is wrong, then I get another error.

Thanks

Replace

alveo stats

with

'alveo stats'!

in the formula.
 
Upvote 0
Don't know where I'm going wrong, but still not working still getting #ref, #name and #value errors.
Thanks
 
Upvote 0
Don't know where I'm going wrong, but still not working still getting #ref, #name and #value errors.
Thanks

You can't get such different errors by editing the sheet name part... Try to be exact on what error you get. That said: Control+shift+enter...

=MAX(FREQUENCY(IF('alveo stats'!P2:P3548>0,ROW('alveo stats'!P2:P3548)),IF('alveo stats'!P2:P3548<=0,ROW('alveo stats'!P2:P3548))))
 
Upvote 0

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