Bonjour,
Essaie ainsi, mais que cela ne t'empêche pas de joindre un fichier pour la suite.
Cdlt.
Public Sub Stock_security()
Dim A, B, D As Double, sigma As Double, h As Double
With Worksheets("Résultat")
A = .Range("D2").Value
B = .Range("C2").Value
End With
Range("G2").Value = WorksheetFunction.Average(A, B)
D = Range("G2").Value
'If D > 0 Then
'sigma = WorksheetFunction.StDev(A, B)
'h = sigma / D
'End If
'MsgBox h
End Sub