Private Sub CommandButton1_Click() 'bouton Confirmer
Dim dat1 As Variant, dat2 As Variant
Dim i As Long, dat As Variant, v As Double
dat1 = Replace(ComboBox1, ".", "/")
dat2 = Replace(ComboBox2, ".", "/")
If Not IsDate(dat1) Then MsgBox "Choisissez une date": ComboBox1.DropDown: Exit Sub
If Not IsDate(dat2) Then MsgBox "Choisissez une date": ComboBox2.DropDown: Exit Sub
dat1 = CDate(dat1): dat2 = CDate(dat2)
For i = 4 To [A65536].End(xlUp).Row
dat = Replace(Cells(i, 1), ".", "/")
If IsDate(dat) Then
dat = CDate(dat)
If dat >= dat1 And dat <= dat2 Or dat >= dat2 And dat <= dat1 _
Then v = v + Val(Replace(Cells(i, 4), ",", ".")) 'pour les nombres décimaux
End If
Next
MsgBox v 'si l'on veut afficher comme ça...
End Sub