David Super User


Joined: 24 Oct 2003 Posts: 5668 Location: Canada
|
Posted: Mon Dec 05, 2005 4:44 am Post subject: On random number in a range |
|
|
You'd think that with my small dinosaur brain it wouldn't take so long to work to the front, but I realised I gave a wrong formula a while back when discussing randbetween(). The correct formula for a range is, for example, =INT(RAND()*($G$1-$G$2+1)+$G$2), where G1 contains the max required and G2 the min. I had the "1" in the wrong spot, then finally remembered, or, more precisely, worked through it. The "+1" makes it inclusive.
David. |
|