Option Explicit
Sub poule()
Dim tableau, NbLignes As Long, i As Long, x, y
If Range("B65536").End(xlUp).Row > 1 Then Range("B2:E" & Range("B65536").End(xlUp).Row).ClearContents
Randomize
NbLignes = Range("A65536").End(xlUp).Row
If NbLignes > 1 Then
tableau = Application.Transpose(Range("A2:A" & NbLignes).Value)
NbLignes = NbLignes - 1
For i = NbLignes To 2 Step -1
x = Int(Rnd * i + 1)
y = tableau(x)
tableau(x) = tableau(i)
tableau(i) = y
Next i
If NbLignes = 1 Then
Cells(2, 2) = tableau
Else
For i = 1 To NbLignes
Cells(2 + (i - 1) \ 4, 2 + ((i - 1) Mod 4)) = tableau(i)
Next i
End If
End If
End Sub
Sub raz()
If Range("B65536").End(xlUp).Row > 1 Then Range("B2:E" & Range("B65536").End(xlUp).Row).ClearContents
Range("A1:A" & Range("A65536").End(xlUp).Row).Sort Key1:=Range("A1"), Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
End Sub