ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stop Re-calculating Randbetween (https://www.excelbanter.com/excel-programming/399537-stop-re-calculating-randbetween.html)

FredB

Stop Re-calculating Randbetween
 
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.

Mike H

Stop Re-calculating Randbetween
 
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
"FredB" wrote:

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.


FredB

Stop Re-calculating Randbetween
 
Thanks Mike H

It works a treat

"Mike H" wrote:

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
"FredB" wrote:

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.



All times are GMT +1. The time now is 08:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com