[COLOR="DarkSlateGray"][B]Function ValSeuil(plg As Range, seuil As Double) As Double
Dim i As Long, s As Double
Application.Volatile
i = 1
Do While i <= plg.Rows.Count
s = 0
Do While IsEmpty(plg.Cells(i, 1)) And i <= plg.Rows.Count
i = i + 1
Loop
Do While Not IsEmpty(plg.Cells(i, 1)) And i <= plg.Rows.Count
If IsNumeric(plg.Cells(i, 1)) Then
s = s + plg.Cells(i, 1).Value
i = i + 1
Else
i = i + 1
Exit Do
End If
Loop
ValSeuil = ValSeuil + WorksheetFunction.Min(s, seuil) - (s > seuil) * (s - seuil) / 2
Loop
End Function[/B][/COLOR]