Sub TirageAuSort()
Application.ScreenUpdating = False
[D5:F100].ClearContents
For i = 2 To 99
Sheets("inscription").Range("B" & i) = 100 * Rnd + i / 1000
Next i
DerLig = Application.WorksheetFunction.CountA(Range("A1:A10000"))
If WorksheetFunction.Even(DerLig) = DerLig Then
DerLig = DerLig - 1
MsgBox "Attention, nombre d'équipes impaire"
End If
Equipe = 1: PetiteValeur = 0
For i = 2 To DerLig Step 2
PetiteValeur = PetiteValeur + 1
Indice = Application.Small(Range("B2:B" & DerLig), PetiteValeur)
NomEquipe = Application.Match(Indice, Range("B2:B" & DerLig), 0)
[D5:D54].Cells(Equipe, 1) = [A2:A100].Cells(NomEquipe, 1)
PetiteValeur = PetiteValeur + 1
Indice = Application.Small(Range("B2:B" & DerLig), PetiteValeur)
NomEquipe = Application.Match(Indice, Range("B2:B" & DerLig), 0)
[F5:F54].Cells(Equipe, 1) = [A2:A100].Cells(NomEquipe, 1)
Equipe = Equipe + 1
Next i
[B2:B100].ClearContents
[A1].Select
End Sub