Using Excel 2010
Hello,
I need help it is bit tricky random number generator…
Step1-I want first VBA create a list of numbers 1 to 54 in the range C6:C59.
Step2-Pick 1 random numbers out of list range C6:C59 and list it in cell D6.
Step3-Delete picked random from the list C6:C59 and shift up.
Step-4 repeat the Step-2 and place 2nd random below the Cell D6..and continue till find 20 random numbers…
Here below is the example sheet…showing remaining numbers in column C, 20 random in Column D, also check 54 list result in Column G.
Regards,
Moti
Hello,
I need help it is bit tricky random number generator…
Step1-I want first VBA create a list of numbers 1 to 54 in the range C6:C59.
Step2-Pick 1 random numbers out of list range C6:C59 and list it in cell D6.
Step3-Delete picked random from the list C6:C59 and shift up.
Step-4 repeat the Step-2 and place 2nd random below the Cell D6..and continue till find 20 random numbers…
Here below is the example sheet…showing remaining numbers in column C, 20 random in Column D, also check 54 list result in Column G.
Excel Questions.xlsm | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | ||||||||||
2 | ||||||||||
3 | ||||||||||
4 | Pick | |||||||||
5 | Numbers List | 20 Random | Full List | Count | ||||||
6 | 2 | 1 | 1 | 1 | ||||||
7 | 3 | 5 | 2 | 1 | ||||||
8 | 4 | 6 | 3 | 1 | ||||||
9 | 7 | 10 | 4 | 1 | ||||||
10 | 8 | 12 | 5 | 1 | ||||||
11 | 9 | 15 | 6 | 1 | ||||||
12 | 11 | 20 | 7 | 1 | ||||||
13 | 13 | 22 | 8 | 1 | ||||||
14 | 14 | 28 | 9 | 1 | ||||||
15 | 16 | 36 | 10 | 1 | ||||||
16 | 17 | 38 | 11 | 1 | ||||||
17 | 18 | 39 | 12 | 1 | ||||||
18 | 19 | 41 | 13 | 1 | ||||||
19 | 21 | 44 | 14 | 1 | ||||||
20 | 23 | 46 | 15 | 1 | ||||||
21 | 24 | 47 | 16 | 1 | ||||||
22 | 25 | 50 | 17 | 1 | ||||||
23 | 26 | 51 | 18 | 1 | ||||||
24 | 27 | 52 | 19 | 1 | ||||||
25 | 29 | 54 | 20 | 1 | ||||||
26 | 30 | 21 | 1 | |||||||
27 | 31 | 22 | 1 | |||||||
28 | 32 | 23 | 1 | |||||||
29 | 33 | 24 | 1 | |||||||
30 | 34 | 25 | 1 | |||||||
31 | 35 | 26 | 1 | |||||||
32 | 37 | 27 | 1 | |||||||
33 | 40 | 28 | 1 | |||||||
34 | 42 | 29 | 1 | |||||||
35 | 43 | 30 | 1 | |||||||
36 | 45 | 31 | 1 | |||||||
37 | 48 | 32 | 1 | |||||||
38 | 49 | 33 | 1 | |||||||
39 | 53 | 34 | 1 | |||||||
40 | 35 | 1 | ||||||||
41 | 36 | 1 | ||||||||
42 | 37 | 1 | ||||||||
43 | 38 | 1 | ||||||||
44 | 39 | 1 | ||||||||
45 | 40 | 1 | ||||||||
46 | 41 | 1 | ||||||||
47 | 42 | 1 | ||||||||
48 | 43 | 1 | ||||||||
49 | 44 | 1 | ||||||||
50 | 45 | 1 | ||||||||
51 | 46 | 1 | ||||||||
52 | 47 | 1 | ||||||||
53 | 48 | 1 | ||||||||
54 | 49 | 1 | ||||||||
55 | 50 | 1 | ||||||||
56 | 51 | 1 | ||||||||
57 | 52 | 1 | ||||||||
58 | 53 | 1 | ||||||||
59 | 54 | 1 | ||||||||
60 | ||||||||||
61 | ||||||||||
Sheet0 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G6:G59 | G6 | =COUNTIF(C$6:D$59,F6) |
Regards,
Moti