Try some code like the following:
Sub AAA()
Dim V As Variant
Dim N As Long
Dim StartRandList As Range
Dim StartOrigData As Range
' StartRandList is the first cell where the random rows
' are to be written.
Set StartRandList = Worksheets("Sheet2").Range("A1")
' StartOrigData is the first cell of the data to be
' randomly copied.
Set StartOrigData = Worksheets("Sheet1").Range("A1")
V = UniqueRandomLongs(Minimum:=1, Maximum:=2260, Number:=200)
For N = LBound(V) To UBound(V)
StartOrigData(V(N)).EntireRow.Copy
Destination:=StartRandList(N, 1)
Next N
End Sub
You'll need the modRandomLongs module from
http://www.cpearson.com/zips/modRandomLongs.zip
which contains the UniqueRandomLongs function.
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Thu, 26 Mar 2009 03:22:03 -0700, Thierry Sophia-Antipolis <Thierry