Hello,</SPAN>
Here is a bit difficult random number generator task, because I need a VBA that can choose 7 random numbers out of 9, which are listed in the cells A4:A12 </SPAN></SPAN>
Create for example 52 random in the cells F4:L55 but conditions is limit max repetitions 2 or 3 as shown in the example below is it possible?</SPAN></SPAN>
Finally in the column N list the repeated numbers amount</SPAN></SPAN>
Example...
</SPAN></SPAN>
Thank you all</SPAN></SPAN>
Excel 2000</SPAN></SPAN>
Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
Here is a bit difficult random number generator task, because I need a VBA that can choose 7 random numbers out of 9, which are listed in the cells A4:A12 </SPAN></SPAN>
Create for example 52 random in the cells F4:L55 but conditions is limit max repetitions 2 or 3 as shown in the example below is it possible?</SPAN></SPAN>
Finally in the column N list the repeated numbers amount</SPAN></SPAN>
Example...
Book1 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | |||
1 | ||||||||||||||||
2 | ||||||||||||||||
3 | Total Numbers | n1 | n2 | n3 | n4 | n5 | n6 | n7 | Max Repeated | |||||||
4 | 1 | 3 | 1 | 5 | 5 | 7 | 1 | 3 | 2 | |||||||
5 | 2 | 8 | 5 | 8 | 1 | 5 | 6 | 1 | 2 | |||||||
6 | 3 | 3 | 1 | 5 | 5 | 7 | 1 | 3 | 2 | |||||||
7 | 4 | 5 | 2 | 5 | 3 | 4 | 5 | 1 | 3 | |||||||
8 | 5 | 2 | 2 | 1 | 5 | 2 | 8 | 1 | 3 | |||||||
9 | 6 | 6 | 8 | 7 | 1 | 5 | 1 | 4 | 2 | |||||||
10 | 7 | 3 | 4 | 1 | 4 | 1 | 3 | 3 | 3 | |||||||
11 | 8 | 2 | 6 | 2 | 1 | 4 | 1 | 3 | 2 | |||||||
12 | 9 | 1 | 4 | 8 | 3 | 8 | 2 | 8 | 3 | |||||||
13 | 2 | 3 | 1 | 1 | 3 | 4 | 3 | 3 | ||||||||
14 | 3 | 6 | 4 | 8 | 3 | 1 | 8 | 2 | ||||||||
15 | 1 | 3 | 5 | 3 | 1 | 5 | 3 | 3 | ||||||||
16 | 3 | 2 | 3 | 1 | 4 | 1 | 8 | 2 | ||||||||
17 | 1 | 1 | 5 | 8 | 4 | 3 | 6 | 2 | ||||||||
18 | 1 | 4 | 5 | 2 | 4 | 1 | 3 | 2 | ||||||||
19 | 5 | 3 | 2 | 1 | 4 | 1 | 4 | 2 | ||||||||
20 | 1 | 1 | 4 | 1 | 5 | 8 | 3 | 3 | ||||||||
21 | 3 | 4 | 1 | 5 | 2 | 1 | 2 | 2 | ||||||||
22 | 1 | 9 | 9 | 2 | 9 | 5 | 6 | 3 | ||||||||
23 | 4 | 9 | 9 | 9 | 2 | 2 | 3 | 3 | ||||||||
24 | 1 | 4 | 4 | 8 | 8 | 2 | 2 | 2 | ||||||||
25 | 1 | 4 | 5 | 3 | 3 | 5 | 6 | 2 | ||||||||
26 | 1 | 2 | 1 | 2 | 1 | 3 | 4 | 3 | ||||||||
27 | 2 | 1 | 5 | 2 | 8 | 2 | 5 | 3 | ||||||||
28 | 9 | 1 | 3 | 6 | 4 | 5 | 3 | 2 | ||||||||
29 | 2 | 4 | 1 | 1 | 1 | 3 | 3 | 3 | ||||||||
30 | 5 | 1 | 7 | 2 | 3 | 2 | 3 | 2 | ||||||||
31 | 2 | 6 | 1 | 7 | 1 | 3 | 7 | 2 | ||||||||
32 | 3 | 1 | 1 | 1 | 4 | 8 | 8 | 3 | ||||||||
33 | 6 | 1 | 8 | 1 | 4 | 3 | 1 | 3 | ||||||||
34 | 3 | 5 | 5 | 8 | 8 | 3 | 4 | 2 | ||||||||
35 | 1 | 2 | 3 | 7 | 4 | 2 | 3 | 2 | ||||||||
36 | 8 | 3 | 2 | 1 | 1 | 8 | 1 | 3 | ||||||||
37 | 7 | 5 | 3 | 3 | 2 | 4 | 5 | 2 | ||||||||
38 | 8 | 4 | 3 | 5 | 1 | 1 | 5 | 2 | ||||||||
39 | 8 | 2 | 1 | 1 | 3 | 5 | 2 | 2 | ||||||||
40 | 4 | 2 | 5 | 5 | 1 | 1 | 1 | 3 | ||||||||
41 | 3 | 3 | 5 | 5 | 6 | 8 | 5 | 3 | ||||||||
42 | 3 | 3 | 2 | 7 | 2 | 9 | 1 | 2 | ||||||||
43 | 3 | 4 | 7 | 1 | 1 | 2 | 6 | 2 | ||||||||
44 | 5 | 6 | 2 | 8 | 2 | 3 | 7 | 2 | ||||||||
45 | 9 | 1 | 3 | 6 | 9 | 1 | 9 | 3 | ||||||||
46 | 2 | 7 | 4 | 4 | 8 | 1 | 7 | 2 | ||||||||
47 | 6 | 3 | 1 | 1 | 4 | 2 | 8 | 2 | ||||||||
48 | 5 | 3 | 1 | 5 | 2 | 8 | 2 | 2 | ||||||||
49 | 3 | 9 | 3 | 2 | 1 | 1 | 1 | 3 | ||||||||
50 | 5 | 1 | 9 | 1 | 9 | 8 | 4 | 2 | ||||||||
51 | 2 | 5 | 3 | 4 | 2 | 9 | 2 | 3 | ||||||||
52 | 2 | 2 | 1 | 8 | 1 | 2 | 1 | 3 | ||||||||
53 | 3 | 1 | 3 | 4 | 1 | 5 | 8 | 2 | ||||||||
54 | 1 | 4 | 3 | 3 | 2 | 2 | 3 | 3 | ||||||||
55 | 2 | 1 | 4 | 3 | 8 | 6 | 2 | 2 | ||||||||
Sheet10 |
Thank you all</SPAN></SPAN>
Excel 2000</SPAN></SPAN>
Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>