Sub Decompte_Visites_Patients()
Set mondico = CreateObject("Scripting.Dictionary")
Application.ScreenUpdating = False
Range("A2:C" & Range("A65536").End(xlUp).Row).Sort Key1:=[B2], Order1:=xlAscending, Header:=xlGuess
For Each C In Range("B2:B" & Range("A65536").End(xlUp).Row)
temp = Format(C.Value, "mmmm yyyy") & "_" & C.Offset(, 1).Value
mondico(temp) = mondico(temp) + 1
Next C
With Sheets("Feuil2")
.Range("A1") = "VMDD": .Range("B1") = "PATNOMP": .Range("C1") = "Nbre de visites"
.Range("A2").Resize(mondico.Count, 1) = Application.Transpose(mondico.keys)
.Range("C2").Resize(mondico.Count, 1) = Application.Transpose(mondico.items)
.Range("A2:A" & .Range("A65536").End(xlUp).Row).TextToColumns Destination:=.Range("A2"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar:="_"
End With
Application.ScreenUpdating = True
End Sub