Good morning CobraLAD
Quote Originally Posted by CobraLAD
I want to insert numbers 1 to 12 randomly in Range("E11:E22"), everytime I click on a commandbutton on the page, there must be no duplicate numbers
Does this work OK for your needs :
Sub test()
Dim rand1(12)
T = 0
Randomize
For n = 1 To 12
Check1:
rand1(n) = Int((12 * Rnd(100)) + 1)
For F = 1 To T
If rand1(n) = rand1(F) Then GoTo Check1:
Next F
T = T + 1
Next n
For n = 1 To 12
Range("E" & n + 10).Value = rand1(n)
Next n
End Sub
HTH

DominicB