-
No you didn't. That requirement was in a previous post.
Code:
This way it will not show any repeated numbers in any of the cells.
That's why I wrote this code this way. C = 0 to 7, D = 1 to 7 & <> C, E = 2 to 9 & <> (C Or D)
Quote:
Code:
'Randomizing code = Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Randomize
Randoms(1) = Int((8) * Rnd )
Do While Randoms(1) <> Randoms(2)
Randomize
Randoms(2) = Int((8) * Rnd + 1)
Loop
Do While Randoms(1) <> Randoms(3) And Randoms(2) <> Randoms(3)
Randomize
Randoms(3) = Int((8) * Rnd + 2)
Loop
I am curious as to why those particular parameters. That does not prevent an occurrence where the magnitude order descends from C to D. (7, 5, 3.)
The requirement of only Ascending numbers, sets up the following:
1/2 the time, C will be >= 4
1/2 of that time, or 1/4 of the time, D will be >= 7
1/2 of that time, E will = 8 and 1/2 of that time it will = 9
IOW, 1/4 of the time, D will be 7 or 8 and E will be 8 or 9. Not very random.