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

I can't figure out how to work this into my macro. The problem is i have
data that is in 5 columns. I need random sampling without duplicating the
data in column A but the whole row needs to be brought over to worksheet two.
Thanks!!

"JE McGimpsey" wrote:

Take a look at the method used he

http://mcgimpsey.com/excel/udfs/samplenoreplace.html


In article ,
"beccadawn0622" wrote:

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!