Trouble with RANDBETWEEN
Could we say that if we wanted to write out the rule for performing this
particular type of calculation, that if we wanted to generate a random number
(MyValue) between two other numbers (x, y) and yx :
MyValue = Int( ( ( (y-x)+1)*RND() ) + (x-1) )
This should work for most positive random numbers that we wish to find
random numbers between, right?
"JE McGimpsey" wrote:
Modify Ian's code slightly:
MyValue = Int(3 * RND()) + 9
In article ,
"GSpline" wrote:
Thanks for the info, Ian. I am not having much luck with this particular
question in the online help. What you posted is close to what I am looking
for, but I am needing the random value to be between two numbers other than
1, for example a random number between 9 and 11. I will keep plugging away,
it looks like this gives me a starting point now.
|