Permutation Macro help please!!!

Ikenna

New Member
Joined
Jan 11, 2015
Messages
2
Anybody, please help me. I need to do a complete enumeration of number permutation for sports betting accumulation.

Here's my problem

There a 5 matches being played in the NBA

LA Lakers(LAL) Vs Sacramento Kings(SAC)
Toronto Raptors(TOR) Vs Atlanta Hawks(ATL)
LA Clippers(LAC) Vs San Antonio Spurs(SAS)
Memphis Grizzlies(MEM) Vs Phoenix Suns(PHX)
Portland Trail Blazers(POR) Vs Cleveland Cavaliers(CLE)

Let's assume the the result for ;

First match LA Lakers Vs Sacramento King is

(100 - 700) the sum is 170 which is an EVEN number
OR
(107 - 98) the sum is 205 which is an ODD number

Second match Toronto Raptors Vs Atlanta Hawks is

(112- 117) the sum is 229 which is an ODD number
OR
(98 - 102) the sum is 200 which is an EVEN number

Third match LA Clippers Vs San Antonio Spurs is

(70 - 72) the sum is 142 which is an EVEN number
OR
(100- 79) the sum is 179 which is an ODD number

Fourth Match Memphis Grizzlies Vs Phoenix Suns is

(105 - 116) the sum is 221 which is an ODD number
OR
(98 - 90) the sum is 188 which is an EVEN number

Fifth Match Portland Trail Blazers Vs Cleveland Cavaliers is

(98 -86) the sum is 184 which is an EVEN number
OR
(85 - 110) the sum is 195 which is an ODD number

*For every match there are two possible outcomes either ODD or EVEN
i need a macro to generate all the possible ARRANGEMENT(permutation) without repetition, of the outcome either ODD or EVEN of all the 5 matches to be placed on a betting slip

Here's an illustration

1st Betting Slip 2nd Betting Slip 3rd Betting Slip 4th Betting Slip 5th Betting Slip 6th Betting Slip
LAL Vs SAC - ODD LAL Vs SAC - EVEN LAL Vs SAC - ODD LAL Vs SAC - EVEN LAL Vs SAC - ODD LAL Vs SAC - EVEN
TOR Vs ATL - ODD TOR Vs ATL - EVEN TOR Vs ATL - EVEN TOR Vs ATL - ODD TOR Vs ATL - ODD TOR Vs ATL - EVEN
LAC Vs SAS - ODD LAL Vs SAC - EVEN LAL Vs SAC - ODD LAL Vs SAC - EVEN LAL Vs SAC - ODD LAL Vs SAC- EVEN
MEM Vs PHX - ODD LAL Vs SAC - EVEN LAL Vs SAC - EVEN LAL Vs SAC - ODD LAL Vs SAC - ODD LAL Vs SAC - EVEN
POR Vs CLE - ODD POR Vs CLE- EVEN POR Vs CLE - ODD POR Vs CLE - ODD POR Vs CLE - EVEN POR Vs CLE- ODD


Please i need a full permutation(arrangement) of outcome of the matches without repetition.
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
One way:

Row\Col
A​
B​
C​
D​
E​
F​
G​
1​
Slip \ Game
LAL Vs SAC
TOR Vs ATL
LAC Vs SAS
MEM Vs PHX
POR Vs CLE
2​
1​
Even​
Even​
Even​
Even​
Even​
B2: =IF(MOD(INT(2*(ROWS($B$2:Me) - 1) / 2 ^ COLUMNS($B$2:Me)), 2), "Odd", "Even")
3​
2​
Odd​
Even​
Even​
Even​
Even​
4​
3​
Even​
Odd​
Even​
Even​
Even​
5​
4​
Odd​
Odd​
Even​
Even​
Even​
6​
5​
Even​
Even​
Odd​
Even​
Even​
7​
6​
Odd​
Even​
Odd​
Even​
Even​
8​
7​
Even​
Odd​
Odd​
Even​
Even​
9​
8​
Odd​
Odd​
Odd​
Even​
Even​
10​
9​
Even​
Even​
Even​
Odd​
Even​
11​
10​
Odd​
Even​
Even​
Odd​
Even​
12​
11​
Even​
Odd​
Even​
Odd​
Even​
13​
12​
Odd​
Odd​
Even​
Odd​
Even​
14​
13​
Even​
Even​
Odd​
Odd​
Even​
15​
14​
Odd​
Even​
Odd​
Odd​
Even​
16​
15​
Even​
Odd​
Odd​
Odd​
Even​
17​
16​
Odd​
Odd​
Odd​
Odd​
Even​
18​
17​
Even​
Even​
Even​
Even​
Odd​
19​
18​
Odd​
Even​
Even​
Even​
Odd​
20​
19​
Even​
Odd​
Even​
Even​
Odd​
21​
20​
Odd​
Odd​
Even​
Even​
Odd​
22​
21​
Even​
Even​
Odd​
Even​
Odd​
23​
22​
Odd​
Even​
Odd​
Even​
Odd​
24​
23​
Even​
Odd​
Odd​
Even​
Odd​
25​
24​
Odd​
Odd​
Odd​
Even​
Odd​
26​
25​
Even​
Even​
Even​
Odd​
Odd​
27​
26​
Odd​
Even​
Even​
Odd​
Odd​
28​
27​
Even​
Odd​
Even​
Odd​
Odd​
29​
28​
Odd​
Odd​
Even​
Odd​
Odd​
30​
29​
Even​
Even​
Odd​
Odd​
Odd​
31​
30​
Odd​
Even​
Odd​
Odd​
Odd​
32​
31​
Even​
Odd​
Odd​
Odd​
Odd​
33​
32​
Odd​
Odd​
Odd​
Odd​
Odd​
 
Upvote 0
Edit: left a named range in there:

B2: =IF(MOD(INT(2*(ROWS($B$2:Me) - 1) / 2 ^ COLUMNS($B$2:Me)), 2), "Odd", "Even")

should be

B2: =IF(MOD(INT(2*(ROWS($B$2:B2) - 1) / 2 ^ COLUMNS($B$2:B2)), 2), "Odd", "Even")
 
Upvote 0

Forum statistics

Threads
1,215,615
Messages
6,125,854
Members
449,266
Latest member
davinroach

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