I need a little programme to select randomly numbers from a list of eg. 1-300
and having selected numbers not to repeat them i.e. electronic drawing
numbers from a hat.
Any suggestions?
Julian Marcus
I need a little programme to select randomly numbers from a list of eg. 1-300
and having selected numbers not to repeat them i.e. electronic drawing
numbers from a hat.
Any suggestions?
Julian Marcus
First, ensure cell A1 is empty and goto Tools>Options and on the Calculation
tab check the Iteration checkbox to stop the Circular Reference message.
Next, type this formula into cell B1
=IF(($A$1="")+(AND(B1>0,COUNTIF($B$1:$B$9,B1)=1)),B1,INT(RAND()*300+1))
it should show a 0
Copy B1 down to Bn.
Finally, put some value in A1, say an 'x', and all the random numbers will
be generated, and they won't change.
To force a re-calculation, clear cell A1, edit cell B1, don't change it,
just edit to reset to 0, copy B1 down to Bn, and re-input A1.
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Julian" <[email protected]> wrote in message
news:[email protected]...
> I need a little programme to select randomly numbers from a list of eg.
1-300
> and having selected numbers not to repeat them i.e. electronic drawing
> numbers from a hat.
> Any suggestions?
>
> Julian Marcus
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks