Sub ventiler()
Dim combien, i&, j&, n&, aux, p&, res
Randomize: combien = Range("af7:ag11")
ReDim r(1 To Application.Sum(Range("ag7:ag11"))): ReDim res(1 To 34, 1 To 21)
For i = 1 To UBound(combien): For j = 1 To combien(i, 2): n = n + 1: r(n) = combien(i, 1): Next j, i
For j = 1 To 2: For i = 1 To UBound(r): n = 1 + Int(Rnd * UBound(r)): aux = r(n): r(n) = r(i): r(i) = aux: Next i, j
For i = 1 To 34 Step 2: For j = 1 To 21: p = p + 1: res(i, j) = r(p): Next j, i
Range("j7").Resize(UBound(res), UBound(res, 2)) = res
End Sub