Sub profil_vent()
Dim Tabvent As Variant, cmpt1 As Long, cmpt2 As Integer
ecart=1000
Tabvent = Range(ActiveCell, ActiveCell.Offset(ecart, 41)).Formula
For i = 1 To 10
moy = Sheets("Vitesse vent").Range("B" & i + 1).Value
cmpt2 = (4 * i)
For cmpt1 = LBound(Tabvent, 1) To UBound(Tabvent, 1)
Tabvent(cmpt1, cmpt2) = DistrQsN(Rnd, moy, 1.2)
If Tabvent(cmpt1, cmpt2) < 0 Then
Tabvent(cmpt1, cmpt2) = 0
End If
Next cmpt1
Next i
Range(ActiveCell, ActiveCell.Offset(ecart, 41)).Formula = Tabvent
End Sub