Function SommeSpecial(Plage_Dates As Range, Plage_Data As Range, Date_depart As Range, Date_fin As Range) As Double
Dim C As Range
Dim cpt&
Dim Somme#
'---
For Each C In Plage_Dates
cpt& = cpt& + 1
If IsDate(C) Then
If C >= Date_depart And C <= Date_fin Then
If IsNumeric(Plage_Data(1, cpt&)) Then
Somme# = Somme# + Plage_Data(1, cpt&)
End If
End If
End If
Next C
SommeSpecial = Somme#
End Function