Stop Re-calculating Randbetween

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am developing some simple math questions for my son, and use Randbetween to
generate lists of number for him to do calculations upon. However if he
enters his answers into the spreadsheet, excel re-calculates and changes the
random number values in the math problem. I want to be able to keep the
random numbers, allow my son to enter his answers, use a formula to check
which answers are correct, and not change any of the random numbers until the
next time the I call the macro. Any help would be much appreciated.
 
Hi,

Generate your random numbers with a macro instead. Right click the sheet
tab, view code and paste this in:-

Sub sonic()
For x = 1 To 100
mynum = Int((100 - 1 + 1) * Rnd + 1)
Cells(x, 1).Value = mynum
Next
End Sub

This puts 100 random numbers between (1 & 100) in column A some will be
duplicated but they would with randbetween also.

Mike
 
Thanks Mike H

It works a treat

Mike H said:
Hi,

Generate your random numbers with a macro instead. Right click the sheet
tab, view code and paste this in:-

Sub sonic()
For x = 1 To 100
mynum = Int((100 - 1 + 1) * Rnd + 1)
Cells(x, 1).Value = mynum
Next
End Sub

This puts 100 random numbers between (1 & 100) in column A some will be
duplicated but they would with randbetween also.

Mike
 
Back
Top