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
For a football match there are three outcomes, a win(w) , a draw(d) and lose(l). Selecting two matches gives 8 outcomes
For 3matches there are 27 outcome. The code below list all 27 possible outcomes
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

I wish to list all possible outcomes for 12 matches provided there are only 2 outcomes a win(w) and lose(l) but I can't do it right. Please help thanks
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Duplicate: https://www.mrexcel.com/forum/excel...matches-list-all-64-possible-predictions.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).

If you do not receive a response, you can "bump" it by replying to it again, though we advise you not to bump a thread more than once a day.
 
Status
Not open for further replies.

Forum statistics

Threads
1,222,605
Messages
6,167,024
Members
452,091
Latest member
Jiraya_00

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