List all possible outcome for 12 football games provided there are only two possible outcomes, a win( w) and a lose(l)

Status
Not open for further replies.

mass junior high

New Member
Joined
May 13, 2017
Messages
9
In a football match there are three outcomes, a win(win) ,a draw(d ) and lose(l) . For 2 matches, there are 8 possible outcomes and for 3 , 27 possible outcomes. I found this code to list all 27 possible outcomes for 3 matches
Sub stuff()
Const v& = 3
Dim z, y() As String , q()
Dim a&, b&, c&, d&, p&, MaxRow& MaxRow = 65536 z = Array("H", "D", "A") u = UBound (z) + 1
Redim y(1 To u ^ v, 1 To v)
For a = 1 To v
For b = 1 To u ^ v Step u ^ a
For c = b To b + u ^ (a - 1) - 1
For d = 1 To u y(c + u ^ (a - 1) * (d - 1), v - a + 1) = z(d - 1)
Next d, c, b, a
For a = 1 To u ^ v Step MaxRow
Now am trying to list the possible combination for 12 matches provided there are only two outcomes, a win(w) and lose (l).
Please can someone give me a code to list all 64 possible outcomes for 12 matches
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Duplicate: https://www.mrexcel.com/forum/excel-...edictions.html

Please do not post the same question multiple times. All clarifications, directly-related follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule #12 here: http://www.mrexcel.com/forum/showthread.php?t=99490).

This is the fourth time you have posted the same question. Please stop! Continued disregard of the rules and direction of Moderators will lead to suspension of posting privileges.

You actually already received a reply in your first post that you never acknowledged or responded to.
 
Last edited:
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,446
Messages
6,124,904
Members
449,194
Latest member
JayEggleton

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