View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
beccadawn0622
 
Posts: n/a
Default Random Sample Without Duplication

I have a macro that generates a random sample of data for me. However, I
always end up with duplicate rows. Here is my macro info:
Sub takeSample()
Randomize Timer
For SampleRow = 2 To 80
dataRow = 2 + Fix(466 * Rnd)
Worksheets("Data").Rows(dataRow).Copy
Worksheets("Sample").Rows(SampleRow).PasteSpecial
Next SampleRow
End Sub
Can anyone Help me write this so I can generate 50 samples from my list that
are not duplicated?

Thanks!