Sub tirage()
[COLOR=SeaGreen] 'adaptation d'un code initial de Lii[/COLOR]
Dim d, i&, j&
Set d = CreateObject("Scripting.Dictionary")
Application.ScreenUpdating = False
Randomize 127854
Do
n = Int(42 * Rnd + 1)
If Not d.Exists(n) Then d.Add n, n
Loop Until d.Count = 42
a = d.keys
For i = 0 To 20
For j = 21 To d.Count - 1
Cells(i + 5, 2) = a(i)
Cells(j - 16, 3) = a(j)
Next j
Next i
End Sub