In B1 through B50 enter:
=RAND()
In A1 enter:
=MATCH(LARGE(B:B,ROW()),B:B,0)
and copy down through A10:
Just write a short macro to insert the formulas. If you don't want to use the worksheet approach then:
Sub WillNotRepeat() Dim ndex(1 To 50) For I = 1 To 50 ndex(I) = I Next I Call Shuffle(ndex) For I = 1 To 10 msg = msg & ndex(I) & vbCrLf Next I MsgBox msg End Sub Public Sub Shuffle(InOut() As Variant) Dim I As Long, J As Long Dim tempF As Double, Temp As Variant Hi = UBound(InOut) Low = LBound(InOut) ReDim Helper(Low To Hi) As Double Randomize For I = Low To Hi Helper(I) = Rnd Next I J = (Hi - Low + 1) \ 2 Do While J > 0 For I = Low To Hi - J If Helper(I) > Helper(I + J) Then tempF = Helper(I) Helper(I) = Helper(I + J) Helper(I + J) = tempF Temp = InOut(I) InOut(I) = InOut(I + J) InOut(I + J) = Temp End If Next I For I = Hi - J To Low Step -1 If Helper(I) > Helper(I + J) Then tempF = Helper(I) Helper(I) = Helper(I + J) Helper(I + J) = tempF Temp = InOut(I) InOut(I) = InOut(I + J) InOut(I + J) = Temp End If Next I J = J \ 2 Loop End Sub