Randomizer / Pairing

juleskaynel

New Member
Joined
Mar 14, 2014
Messages
11
I have a list of names and I want to randomly pair them in twos. How would I do this in Excel?

Example:
A1
A2
A3
A4
A5
A6
A7
A8
 
Hello, this seemed to work. How do I do this with 2 groups of people. Group A and Group B to be paired with one another with no duplicates?
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Sort one list A randomly: e.g. produce random numbers in the adjacent column, sort A by it, and then eliminate the column. Then pair first from A with first from B, second from A with second from B, etc.

J.Ty.
 
Upvote 0
Upvote 0
Pairing from one list can be done in a similar way:
Sort list by random numbers in the adjacent column, then pair 1st with 2nd, 3rd with 4th, etc.
No need to use VBA or other high-tech methods.

J.Ty.
 
Upvote 0
Using this, there must be a way...

Sub RandomPairing()

Dim Cnt As Long, RandomIndex As Long, Tmp As Variant, Arr As Variant
Randomize
Arr = Range("A2", Cells(Rows.Count, "A").End(xlUp))
For Cnt = UBound(Arr) To 1 Step -1
RandomIndex = Int((Cnt - LBound(Arr) + 1) * Rnd + LBound(Arr))
Tmp = Arr(RandomIndex, 1)
Arr(RandomIndex, 1) = Arr(Cnt, 1)
Arr(Cnt, 1) = Tmp
Next
Range("G4").Resize(UBound(Arr)) = Arr
Range("G4").Offset(UBound(Arr) / 2).Resize(UBound(Arr)).Cut Range("H4")

End Sub
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top