i need 40 random numbers in 40 cell with no matches

P

Peo Sjoblom

If you with no matches mean no duplicates and 40 numbers only it won' really
be random? You can use a simplistic approach and put let's say 1000 from
1-1000 in A1:A1000, then in B1 put =RAND(), copy down to B1000, now select
both columns and sort by column B, then select the first 40 numbers in A and
copy somewhere else.



Regards,

Peo Sjoblom
 
B

Bob Phillips

or you could turn iteration on and put this formula in B1 and copy down to
B40

=IF((B1>0)*(COUNTIF($B$1:B1,B1)=1),B1,(INT(RAND()*40+1)))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top