Sub test()
[E6].Resize(Range("F2").Value) = tirage(1, Range("F2").Value)
End Sub
Function tirage(min&, max&)
Dim i&, tmp&, alea!
If min > max Then Exit Function
ReDim Table&(min To max, 0)
For i = min To max: Table(i, 0) = i: Next
Randomize
For i = min To max
tmp = Table(i, 0)
alea = Int(i + (max - min - i + 2) * Rnd)
Table(i, 0) = Table(alea, 0): Table(alea, 0) = tmp
Next
tirage = Table
End Function