Try this one I made earlier. Click the yellow cells to generate a random selection, no need to delete old selections.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim LastRow As Long, RowNo As Long, n As Long
Dim isect As Range
Application.ScreenUpdating = False
Set isect = Intersect(Target, Range("A1:C1"))
If Not isect Is Nothing Then
LastRow = UsedRange.Find(What:="*", _
SearchDirection:=xlPrevious, SearchOrder:=xlByRows, _
LookIn:=xlFormulas).Row
For RowNo = 3 To LastRow
Range("D" & RowNo).Formula = Rnd()
Next
Range("B2:D" & LastRow).Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A2").Select
Range("D3:G" & LastRow).ClearContents
n = 2
For RowNo = 3 To LastRow Step 2
n = n + 1
Range("E" & n) = n - 2
Range("F" & n) = Range("B" & RowNo)
Range("G" & n) = Range("B" & RowNo + 1)
Next
End If
Application.ScreenUpdating = True
End Sub
Hope this helps
Bookmarks