Question Permutations

froggeja

New Member
Joined
May 30, 2014
Messages
26
I have 8 questions (A - H) and 5 answers per question (1 - 5) - so a total of 40 possible answers.

Using PERMUT(8,5), I know there are 6,720 permutations of answers.

I now need to fill a matrix of 840 rows and 8 columns (Question ID) with the 6,720 permutations.

I want to fill them with an Answer ID (there are 40 answers) - A1, A2, A3, A4, A5....B1, B2, B3, B4, B5....and so on,.

Does anyone have a solution to this? Ideally, I would like a formula as opposed to VBA as I'm a little out of my depth when it comes to VBA code. However, I'll take whatever I can get!

Thanks in advance.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I don't follow your maths. Do you mean permutations like this, in which case you'll have 5^8 = 390,625 possibilities (rows)?

Excel 2010
ABCDEFGH
1ABCDEFGH
211111111
311111112
411111113
511111114
611111115
711111121
811111122
911111123
1011111124
1111111125
1211111131
1311111132
14etc
1555555555

<tbody>
</tbody>
Sheet1
 
Upvote 0
Hi Stephen,

This is the data (below). I used the formula PERMUT(8,5) to calculate the permutations: 6,720.

Question
1
23
4
5
A
A1
A2
A3
A4
A5
B
B1
B2
B3
B4
B5
C
C1
C2
C3
C4
C5
D
D1
D2
D3
D4
D5
E
E1
E2
E3
E4
E5
F
F1
F2
F3
F4
F5
G
G1
G2
G3
G4
G5
H
H1
H2
H3
H4
H5

<tbody>
</tbody>














I now want to be able to populate this grid:

Permutation
A
B
C
D
E
F
G
H
PERM 1
A1
B1
C1
D1
E1
F1
G1
H1
PERM 2
A1
B2
C1
D1
E1
F1
G1
H1
PERM 3
A1
B3
C1
D1
E1
F1
G1
H1
ETC,.

<tbody>
</tbody>

Hope this helps.

thanks
 
Upvote 0
Perhaps like this:

N: =5
B2: =B$1&MOD(INT((ROW()-ROW($B$2))/N^(COLUMN($I$1)-COLUMN())),N)+1 (copy down and across)

Excel 2010
ABCDEFGHI
1PermutationABCDEFGH
21A1B1C1D1E1F1G1H1
32A1B1C1D1E1F1G1H2
43A1B1C1D1E1F1G1H3
54A1B1C1D1E1F1G1H4
65A1B1C1D1E1F1G1H5
76A1B1C1D1E1F1G2H1
87A1B1C1D1E1F1G2H2
98A1B1C1D1E1F1G2H3
109A1B1C1D1E1F1G2H4
1110A1B1C1D1E1F1G2H5
1211A1B1C1D1E1F1G3H1
1312A1B1C1D1E1F1G3H2
14etc
15390,622A5B5C5D5E5F5G5H2
16390,623A5B5C5D5E5F5G5H3
17390,624A5B5C5D5E5F5G5H4
18390,625A5B5C5D5E5F5G5H5

<tbody>
</tbody>
Sheet1

PERMUT(8,5) is the answer to a different question, e.g. We have covered 8 topics this semester. The exam paper will include 5 of these topics (randomly selected). How many possible exam papers, i.e. combinations of topics, can there be? Answer: COMBIN(8,5) = 56

How many different orders of examination paper topics can there be? Answer: PERMUT(8,5) = 6,720. Because for any of the possible subject combinations in COMBIN(8,5), e.g. A, C, D, F, G (say), we can arrange these subjects in 5! ways, i.e. five possible subjects for the first question, 4 for the second etc etc, and 56 x 5! = 6,720.
 
Upvote 0

Forum statistics

Threads
1,215,561
Messages
6,125,542
Members
449,236
Latest member
Afua

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