Random Multiple choice questions

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
143
Office Version
  1. 2013
Platform
  1. Windows
In column A , I have a set of Multiple choice questions as part of a question bank. Columns B, C, D & E has the 4 options for the questions
Like Say in A1 if there is a question, then cells B1, C1, D1 & E1 has the 4 options to that question and Similarly for in A2 if there is a question, then cells B2, C2, D2 & E2 has the 4 options to that question

Now out of the 4 probable answers to the questions listed in cell B,C, D & E there is only a single correct answer

Now What I have done is used a formula to make sets of random 10 questions from the above list in column A =INDEX(A$1:A$100,RANDBETWEEN(1,ROWS(A$1:A$100)),1), this works fine

But I want the sequence of the answers to be also randomized in the subsequent columns and another column which says the correct answer
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
with that formula, you can't avoid to get duplicate questions !
 
Upvote 0
A:F are 100 rows with your questions and multiple choices, column G is arandom number 0-1
Column K are indexes for your 10 questions, column L is an unique random number between 1-100, and the following columns are the corresponding questions and multiple choices.
perhaps set the calculation at manual
Map1
ABCDEFGHIJKLMNOPQR
1A1B1C1D1E1F10,25219questionrowquestionoption1option2option3option4option5
2A2B2C2D2E2F20,828978129A29B29C29D29E29F29
3A3B3C3D3E3F30,873429290A90B90C90D90E90F90
4A4B4C4D4E4F40,273281375A75B75C75D75E75F75
5A5B5C5D5E5F50,816222463A63B63C63D63E63F63
6A6B6C6D6E6F60,777814524A24B24C24D24E24F24
7A7B7C7D7E7F70,84198686A86B86C86D86E86F86
8A8B8C8D8E8F80,499516785A85B85C85D85E85F85
9A9B9C9D9E9F90,542749837A37B37C37D37E37F37
10A10B10C10D10E10F100,512404993A93B93C93D93E93F93
11A11B11C11D11E11F110,4020081042A42B42C42D42E42F42
12A12B12C12D12E12F120,846647
13A13B13C13D13E13F130,631427
Blad1
Cell Formulas
RangeFormula
L2:L11L2=MATCH(SMALL($G$1:$G$100,K2),$G$1:$G$100,0)
M2:R11M2=INDEX($A$1:$G$100,$L2,COLUMN()-COLUMN($L$1))
G1:G13G1=RAND()
 
Upvote 0
the questions have become randomised. but the options are not randomized.

Like if Mr.X gets the question No. 8 as the 1st question and Mr.Y gets the same question No. 8 as the 5th question the sequence of options remains the same
 
Upvote 0
apgmin.xlsb
KLMNOPQRS
1questionsort questionsquestionanswer1answer2answer3answer4correct answer
21114A11B11D11E11C11F11
32611A6C6E6B6D6F6
4352A5B5C5E5D5F5
541321A13E13C13B13D13F13
65914A9D9B9E9C9F9
761216A12D12C12E12B12F12
87416A4D4C4E4B4F4
9876A7B7E7D7C7F7
109318A3D3E3C3B3F3
1110819A8E8B8C8D8F8
Blad1
Cell Formulas
RangeFormula
L2:L11L2=RANK(G1,$G$1:$G$13)
M2:M11M2=RANDBETWEEN(1,24)
N2:N11N2=INDEX($A$1:$F$13,$L2,1)
O2:R11O2=INDEX($A$1:$F$13,$L2,1+INDEX(permutaties!$A$1:$D$24,Blad1!$M2,COLUMN()-COLUMN(Blad1!$N$1)))
S2:S11S2=INDEX($A$1:$F$13,$L2,6)

just a macro to create all permutations with 4 elements
apgmin
 
Upvote 0
apgmin.xlsb
KLMNOPQRS
1questionsort questionsquestionanswer1answer2answer3answer4correct answer
21114A11B11D11E11C11F11
32611A6C6E6B6D6F6
4352A5B5C5E5D5F5
541321A13E13C13B13D13F13
65914A9D9B9E9C9F9
761216A12D12C12E12B12F12
87416A4D4C4E4B4F4
9876A7B7E7D7C7F7
109318A3D3E3C3B3F3
1110819A8E8B8C8D8F8
Blad1
Cell Formulas
RangeFormula
L2:L11L2=RANK(G1,$G$1:$G$13)
M2:M11M2=RANDBETWEEN(1,24)
N2:N11N2=INDEX($A$1:$F$13,$L2,1)
O2:R11O2=INDEX($A$1:$F$13,$L2,1+INDEX(permutaties!$A$1:$D$24,Blad1!$M2,COLUMN()-COLUMN(Blad1!$N$1)))
S2:S11S2=INDEX($A$1:$F$13,$L2,6)

just a macro to create all permutations with 4 elements
apgmin
everything works fine but not the random answers options to the questions ie. Answer 1-4. Also in the correct answer can it give the results as option 1 or 2 or 3 or 4, this will help us a lot as then we will not have to go through the options and match the right options to evaluate the responses because the correct answer will be one of the 4 options so instead of the correct answer can we get the option No.
 
Upvote 0
* Why aren't those 4 answers random, ? The 1st row is BDEC, the 2nd CEBD, ... . How is your random ?
* The correct answer in the F-column for the 11th question is for example D11.
Our ideas about this question aren't the same.
Can you give an example (with the XL2BB-tool or with a link or an image ) how it should work ?
 
Upvote 0
I think this is the problem permutaties! & Blad1!, most probably
they are other sheets in your file which I do not have
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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