OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

On random number in a range

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Mon Dec 05, 2005 4:44 am    Post subject: On random number in a range Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group