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