Create "Multiple Choice" Tests on Excel

crilly

New Member
Joined
Nov 26, 2009
Messages
21
Looking to have aMultiple Choice" Tests on Excel for 10 to 20 Question with a pass mark of 80%
and the answers on page 2
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
You have up to 4 answers to a Question, you give one answers and at theend it tells you if you have all or some right I e, 5 out of 10 Question right,but the answers are on page 2 so are not seen when doing the test, so a formulaor function to make a Multiple Choice" Tests<o:p></o:p>
 
Upvote 0
This is not a question that can be answered simply as it requires multiple steps, plus use of form controls for the most elegant interface. It would take me a long time to write out the solution / process longhand!
 
Upvote 0
Do you think going down the Developer route will help me create this test for the (answers & Question) and put a link onto second page? And all help is appreciated <o:p></o:p>
 
Last edited:
Upvote 0
I have a modified Bingo calling workbook to ask random questions 1 to 75 in Category 1, 2, 3, 4 or 5 (your choice).

You click a button and a question from the selected category is posted in cell I4 and four possible answers are posted in cells J4 to J7.

I have not completed the answer compiling portion, nor any grading stuff nor logging the test takers name and such. Probably about 60-70% completed estimated.

Except for the example question and answers I use clinical data for the Q's Movie-2, Movie-3, Geography-1, Geography-2 and for the A's Answer Movie-2, Answer Movie-3, Answer Geo-2, Answer Geo-3 etc.

Howard

The small test taking business portion looks like this.


Excel 2012
HIJ
1Choose CategoryTest Taker Name > >Albert Einstien
2Movie
3QUESTION IS:?? Answer ??
4Male Lead in "Gone with the wind?"Clarke Gable
5Elvis
6Burt Reynolds
7Tom Hanks
Sheet1
Cell Formulas
RangeFormula
I4=VLOOKUP(H17,$L$2:$V$76,VLOOKUP($H$2,$X$2:Y6,2,0),0)
 
Upvote 0
Okay, tweaking some formulas at present.

Do you have any ideas on how you want to "grade" the tests or any thoughts on how the results should be presented?

I will post a link to an example workbook when I get some formulas in place.

Here is the main code that goes in a standard module, probably means little to you until you have a worksheet to look at also.

Howard

Code:
Option Explicit

Sub New_Test() 'You get the idea here, I'm sure.
Dim Data As Range
Set Data = Range("B2:F16")
 Data.Interior.ColorIndex = xlNone
 Range("B18:F40,H4").ClearContents
End Sub


Sub Next_Test()
Dim i As Long
Dim j As Long
Dim k As Variant
Dim l AsLong

'this is where the focus of the code will return _
'if a number has already been called.  See the "GOTO line1" _
'in the If statement below
line1:
 

i = Int((5 * Rnd) + 1) 'produces a random number between 1 & 5
j = Int((15 * Rnd) + 1) 'produces a random number between 1 & 15
 
Application.ScreenUpdating = False
Application.EnableEvents = False

'/ limit the number of questions asked in a test session &
'/ that number is set on sheet1 cell AT3
If Range("A4").Value = [AT3] Then                                                                 '
    MsgBox "Last Question", , "No More Q's!"
    [J4:J7].ClearContents
    [H4].ClearContents
    Exit Sub
End If
        

'"i" & "j" are now a number between 1 & 5 & _
'1 & 15.  So this line will offset from cell A1 _
'the number of rows = to "j" and the numbers of _
'columns = to "i" and select that cell.
Range("A1").Offset(j, i).Select 

' sets "l" to the value of the cell that was just _
'selected in the Range("B2:F17")
l = ActiveCell.Value                   
Range("H4").Value = l


If ActiveCell.Interior.ColorIndex = 3 Then
 GoTo line1
End If

MsgBox "Question is: " & vbCr & Range("I4")
       
With Range("J4").Resize(4, 1)
 .Formula = "=VLOOKUP($H$4,$L$2:$AO$76,($AR$2)+ROW()-3,0)": .Value = .Value
End With

'If the selected cell is not red it turns it red here.
ActiveCell.Interior.ColorIndex = 3 
If ActiveCell.Column = 2 Then
        Range("B50").End(xlUp).Offset(1, 0) = ActiveCell.Value
    ElseIf ActiveCell.Column = 3 Then
        Range("C50").End(xlUp).Offset(1, 0) = ActiveCell.Value
    ElseIf ActiveCell.Column = 4 Then
        Range("D50").End(xlUp).Offset(1, 0) = ActiveCell.Value
    ElseIf ActiveCell.Column = 5 Then
        Range("E50").End(xlUp).Offset(1, 0) = ActiveCell.Value
    ElseIf ActiveCell.Column = 6 Then
        Range("F50").End(xlUp).Offset(1, 0) = ActiveCell.Value
End If

Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
 
Upvote 0
I am putting together 20 Test Type like Mock Large Vehicle Theory Test to road and Traffic signs & Drivers hours. Looking at around 80% pass mark for the tests, I have 15 written on paper but will be go into excel soon. Page one test how many the person get right, i.e. 5 out of 10, Page two hidden answers. And all helpis appreciated thank you.<o:p></o:p>
 
Last edited:
Upvote 0
you can easily create test thru Google Form without coding, you can even extract scores from the result to excel file (CSV) then slice your data.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,218,920
Messages
6,145,225
Members
450,602
Latest member
AceSpace

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