Sub test()
Dim L, C, Ref
Dim DateDeb As Date
Dim DateFin As Date
Dim DateRef As Date
Dim Tab_ref
Set Tab_ref = CreateObject("scripting.dictionary")
L = 3
C = 1
DateDeb = "12/01/2015"
DateFin = "12/01/2015"
'-----------------------------------------------------
' Lecture des données
'-----------------------------------------------------
While Cells(L, C) <> ""
DateRef = Cells(L, C)
If gateref >= detedeb And DateRef <= DateFin Then
Ref = Cells(L, C + 1)
If Tab_ref.exists(Ref) Then
Tab_ref(Ref) = Tab_ref(Ref) + 1
Else
Tab_ref(Ref) = 1
End If
End If
L = L + 1
Wend
'-----------------------------------------------------
' ecriture resultat
'-----------------------------------------------------
L = 3
C = 5
For Each Ref In Tab_ref
Cells(L, C) = Ref
Cells(L, C + 1) = Tab_ref(Ref)
L = L + 1
Next
End Sub