Re: Trouble with RANDBETWEEN
- From: "GSpline" <GSpline@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 1 Sep 2005 15:13:02 -0700
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 y>x :
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 <99C12163-53C6-4DB3-A24E-0333A862FF4B@xxxxxxxxxxxxx>,
> "GSpline" <GSpline@xxxxxxxxxxxxxxxxxxxxxxxxx> 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.
>
.
- Follow-Ups:
- Re: Trouble with RANDBETWEEN
- From: JE McGimpsey
- Re: Trouble with RANDBETWEEN
- References:
- Trouble with RANDBETWEEN
- From: GSpline
- Re: Trouble with RANDBETWEEN
- From: Ian
- Re: Trouble with RANDBETWEEN
- From: GSpline
- Re: Trouble with RANDBETWEEN
- From: JE McGimpsey
- Trouble with RANDBETWEEN
- Prev by Date: Programmatically Disabling Excel Toolbars for one session only?
- Next by Date: How to import a .csv file?
- Previous by thread: Re: Trouble with RANDBETWEEN
- Next by thread: Re: Trouble with RANDBETWEEN
- Index(es):
Relevant Pages
|
Loading