I have coding to random unique
Use array but i not understand with little code
This is coding
I dont understand with this line codeSub RandomArray() Const n& = 15 Dim a(), i, x, y a = Evaluate("row(1:" & n & ")") Randomize For i = 1 To n ' 1 to 15 x = Application.RandBetween(i, n) y = a(i, 1): a(i, 1) = a(x, 1): a(x, 1) = y Next i Range("A1").Resize(n) = a End Sub
Y=a(i,1) 'y = 1,2,3,4,5,6,7...15
a(i,1) =a(x,1) 'a(i,1)=random unique
I want somebody to explain me line this coding,
Bookmarks