I have a dataset that contains 95 records. I need to randomly take the 95 records and put into 5 groups of 19.
Is there a quick and easy way to do this without pulling teeth or just pulling records from a hat
Thanks for the information.
I have a dataset that contains 95 records. I need to randomly take the 95 records and put into 5 groups of 19.
Is there a quick and easy way to do this without pulling teeth or just pulling records from a hat
Thanks for the information.
Randomly select datarows
Greg Neilson
CallumP
Dim TheMainArray(94) As String
'Store the records in "TheMainArray"
Dim PArray(4) As ArrayList
Dim TempRandom As New Random
Dim TempIndex As Integer
For TempIndex = 0 To 94
Dim Index As Integer
Index = TempRandom.Next(0, 5)
If PArray(Index).Count < 15 Then
PArray(Index).Insert(TempRandom.Next(0, 15), (TheMainArray(TempIndex)))
Else
TempIndex -= 1
End If
Next