Sub SAMJ()
Dim firstR As Long, lastR As Long, a, ws1 As Worksheet, ws2 As Worksheet
Dim dic As Object, x As Long
Set dic = CreateObject("Scripting.Dictionary")
Set ws1 = Sheets("sheet1")
Set ws2 = Sheets("sheet2")
firstR = 1 ' <-- change this if needed, row# from which the data begins
lastR = ws1.Range("a65536").End(xlUp).Row
Application.ScreenUpdating = False
For i = firstR To lastR
check:
x = Int((lastR * Rnd()) + firstR)
If Not dic.Exists(x) Then
dic.Add x, Nothing
Else
GoTo check
End If
Next
a = dic.keys
With ws2
.Cells.Clear
lastR = ws2.Range("a65536").End(xlUp).Row
For i = LBound(a) To UBound(a) ' change n, resize(1,n), to # of columns
ws1.Cells(a(i), 1).Resize(1, 4).Copy _
Destination:=ws2.Cells(lastR + i + 1, 1)
Next
End With
Application.ScreenUpdating = True
Set ws2 = Nothing
Set ws2 = Nothing
Set dic = Nothing
Erase a
End Sub