Run this in your first file
Sub jec()
Dim sq, sp
Dim j As Long, jj As Long, x As Long
Range("D6", Range("F" & Rows.Count).End(xlUp)).Name = "ar"
sq = [ar]
[ar].Offset(, 4) = "=rand()"
sp = [index((rank(offset(ar,,4),offset(ar,,4)))-1,)]
[ar].Offset(, 4).ClearContents
ReDim ary(UBound(sq) * UBound(sq, 2), 0)
For j = 1 To UBound(sq)
For jj = 1 To UBound(sq, 2)
ary(x, 0) = sq(j, jj)
x = x + 1
Next
Next
For j = 1 To UBound(sp)
For jj = 1 To UBound(sp, 2)
sq(j, jj) = ary(sp(j, jj), 0)
Next
Next
Range("D6").Resize(j - 1, jj - 1) = sq
End Sub
Bookmarks