Function ConsValues(liDates As Range, liValeurs As Range, minValConsecutives As Integer, minTotal As Double) As Integer
Dim i As Integer
Dim cVal As Integer
Dim tVal As Double
i = 2
While Cells(liDates.Row, i).Value <> ""
If Cells(liValeurs.Row, i).Value = "" Then
If cVal > minValConsecutives And tVal >= minTotal Then ConsValues = ConsValues + 1
cVal = 0
tVal = 0
Else
cVal = cVal + 1
tVal = tVal + Cells(liValeurs.Row, i).Value
End If
i = i + 1
Wend
End Function