ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   i need 40 random numbers in 40 cell with no matches (https://www.excelbanter.com/excel-worksheet-functions/10253-i-need-40-random-numbers-40-cell-no-matches.html)

henry

i need 40 random numbers in 40 cell with no matches
 
can someone help me with this in excel 2003 st. ed

JE McGimpsey

one way:

http://www.mcgimpsey.com/excel/randint.html

In article ,
"henry" wrote:

can someone help me with this in excel 2003 st. ed


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


"henry" wrote:

can someone help me with this in excel 2003 st. ed


Bob Phillips

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

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

--

HTH

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


"Peo Sjoblom" wrote in message
...
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


"henry" wrote:

can someone help me with this in excel 2003 st. ed





All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com