Bonsoir,
J'essaye d'effectuer une macro simple qui compte simplement les jours qui sont passés en mois
Elle se trouve dans le module 5 si besoin mais je vous la mets ici aussi
Mon idée c'est d'afficher dans un msgbox le nombre d'annulation dans le mois
Merci d'avance
Sub comptage()
Dim nb As Integer
Dim I As Integer
Dim Z As Integer
Dim Y As Integer
Dim W As Integer
Dim v As Integer
With Worksheets("Seminaire annulé")
Dim DerLigne As Long
DerLigne = .Range("A65536").End(xlUp).Row
Z = 0
Y = 0
W = 0
v = 0
For I = DerLigne To 2 Step -1
If Month(.Cells(I, "A").Value) = Month(7 / 1 / 2018) Then Z = Z + 1
If Month(.Cells(I, "A").Value) = Month(8 / 1 / 2018) Then Y = Y + 1
If Month(.Cells(I, "A").Value) = Month(9 / 1 / 2018) Then W = W + 1
If Month(.Cells(I, "A").Value) = Month(10 / 1 / 2018) Then v = v + 1
Next I
If Z <> 0 Then MsgBox ("il y a eu " & Z & " annulation le mois de juillet") Else
If Y <> 0 Then MsgBox ("il y a eu " & Y & " annulation le mois d'aout") Else
If W <> 0 Then MsgBox ("il y a eu " & W & " annulation le mois de septembre") Else
If v <> 0 Then MsgBox ("il y a eu " & v & " annulation le mois d'octobre")
End With
End Sub