Trigger the next random question?

qmp

New Member
Joined
Feb 17, 2004
Messages
27
Hi

I understand the random "=INT(160*RAND())". I'm using this to studing for my drivers test. I have 160 questions with four choice's to answer from. I'm also using VHOOKUP for my data base.

My question is, how do I trigger the next question? The way I have the rand and VHOOKUP together works great, but to goto the next random number I have to click in the formula box to get the next random number to appear. I would like to link it to a button. Any idea's?

Another quick one. How do I put my excel sheet here to show what I have?

thanks...
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
i used 10 questions change it

assign this macro to the button and check
Code:
Sub test()
Dim j As Integer
j = Int(10 * Rnd())
If j > 0 Then
Range("A" & j + 1).Select
Else
MsgBox "click again"
Exit Sub
End If

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,588
Messages
6,179,743
Members
452,940
Latest member
rootytrip

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