Run this in a blank worksheet. Pure random number generation.
Sub RandomGroup()
Dim Random
Dim DestCell As Range
Dim i As Long
i = 1
For i = 1 To 40
Set DestCell = ActiveSheet.Cells(i, 1)
Random = Rnd()
Select Case Random
Case Is < 0.25
DestCell = "Team 1"
Case Is < 0.5
DestCell = "Team 2"
Case Is < 0.75
DestCell = "Team 3"
Case Is < 1
DestCell = "Team 4"
End Select
Next i
1st 4 rows are team1, second 4 are team 2 and so forth.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.