Counting consecutive losses (How many times did I lose at least 4 times in a row)

hgh1_us

New Member
Joined
Mar 4, 2006
Messages
12
Office Version
  1. 2019
Platform
  1. MacOS
  2. Mobile
Hello,

I have a fun Roulette spreadsheet that starts with a random number generator in column A (1-37 numbers) (A4:A10000), Column B tells me if I won or not referencing the only numbers that will lose in column J. Then G4 will tell me the Max number of losses consecutively, But I would also like to know how many times I have 4 or more consecutive losses at a time through my 10,000 spins in column A. For example I know that I had a max losing streak of 5 times according to G4, but how many times in Column B, did I lose at least 4 times in a row? Thank you for your help..
Roulette Romanowsky Martingale Simulator
Numbers that will lose
Random numberDid I win?Max num of losses
0​
10​
YesNo
5​
1​
15​
Yes
4​
24​
YesHow many times did I lose 4 or more in a row?
9​
2​
Yes
12​
34​
Yes
12​
No
4​
No
29​
Yes
34​
Yes
26​
Yes
3​
Yes
19​
Yes
14​
Yes
9​
No
10​
Yes
3​
Yes
9​
No
7​
Yes
21​
Yes
4​
No
8​
Yes
15​
Yes
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Sorry, this pic may be easier to see..
 

Attachments

  • Roulette screenshot.png
    Roulette screenshot.png
    73.8 KB · Views: 31
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=SUM(--(FREQUENCY(IF(B4:B10000=F4,ROW(B4:B10000)),IF(B4:B10000<>F4,ROW(B4:B10000)))>3))
 
Upvote 0
Solution
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=SUM(--(FREQUENCY(IF(B4:B10000=F4,ROW(B4:B10000)),IF(B4:B10000<>F4,ROW(B4:B10000)))>3))
Thank you so much fluff! That formula works and I will update my info as you suggested! ;)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,208
Members
448,874
Latest member
b1step2far

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