Want to show ALL possible outcomes of 10 coin flips

sacajamo

New Member
Joined
May 9, 2007
Messages
18
I need to show all possible outcomes (1,024, I think) of flipping a coin 10 times, such as:

H H H H H H H H H H
H H H H H H H H H T

all the way down to:

T T T T T T T T T T

Does anyone know a way I can do that on Excel without reinventing the wheel?
 
Dim rNumber As Long, cNumber As Long
Declares both rNumber and cNumber as variables of data type Long
· ReDim Output (1 to LetterCount ^ NumFlips, 1 To NumFlips)
Declares the size of the array Output, which was previously declared of undetermined size
· For cNumber = 1 to NumFlips
Begins a loop with cNumber as the looping variable, that line is matched with the line Next cNumber
· Output (1, cNumber) = Letters(0)
Sets the value of the (1, cNumber) th Output array element to the Letters array element with zero index
· Next cNumber
ends the looping block between that and For cNumber = 1 to NumFlips above
· If Flag Then Output (rNumber, cNumber) = Output(rNumber - 1, cNumber)
If the Flag variable is True, then set the array element Output(rNumber, cNumber) to the array element Output(rNumber-1, cNumber)
 
Upvote 0

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.

Forum statistics

Threads
1,224,548
Messages
6,179,445
Members
452,915
Latest member
hannnahheileen

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