voici le code
Sub cadumois()
monmois = InputBox("mois choisi (en chifre - janvier=1, février=2, etc...)" )
If monmois = "" Then Exit Sub
If monmois > 12 Then Exit Sub
Range("A1" ) = Choose(monmois, "JANVIER", "FEVRIER", "MARS", "AVRIL", "MAI", "JUIN", "JUILLET", "AOUT", "SEPTEMBRE", "OCTOBRE", "NOVEMBRE", "DECEMBRE" )
Range("A4:AD42" ).Select
Selection.ClearContents
Range("A2" ).Select
With Worksheets("LISTING" ).Range("DD2:DD5000" )
Set ladate = .Find(monmois * 1.1, LookIn:=xlValues)
If Not ladate Is Nothing Then
firstAddress = ladate.Address
Do
a = a + 1
Cells(a + 3, 1) = ladate.Offset(0, -107)
Cells(a + 3, 2) = ladate.Offset(0, -106)
Cells(a + 3, 3) = ladate.Offset(0, -105)
Cells(a + 3, 4) = ladate.Offset(0, -104)
Cells(a + 3, 5) = ladate.Offset(0, -101)
Cells(a + 3, 6) = ladate.Offset(0, -97)
Cells(a + 3, 7) = ladate.Offset(0, -95)
Cells(a + 3, 8) = ladate.Offset(0, -90)
Cells(a + 3, 9) = ladate.Offset(0, -87)
Cells(a + 3, 10) = ladate.Offset(0, -82)
Cells(a + 3, 11) = ladate.Offset(0, -79)
Cells(a + 3, 12) = ladate.Offset(0, -74)
Cells(a + 3, 13) = ladate.Offset(0, -71)
Cells(a + 3, 14) = ladate.Offset(0, -66)
Cells(a + 3, 15) = ladate.Offset(0, -63)
Cells(a + 3, 16) = ladate.Offset(0, -58)
Cells(a + 3, 17) = ladate.Offset(0, -55)
Cells(a + 3, 18) = ladate.Offset(0, -50)
Cells(a + 3, 19) = ladate.Offset(0, -47)
Cells(a + 3, 20) = ladate.Offset(0, -42)
Cells(a + 3, 21) = ladate.Offset(0, -39)
Cells(a + 3, 22) = ladate.Offset(0, -34)
Cells(a + 3, 23) = ladate.Offset(0, -31)
Cells(a + 3, 24) = ladate.Offset(0, -26)
Cells(a + 3, 25) = ladate.Offset(0, -23)
Cells(a + 3, 26) = ladate.Offset(0, -18)
Cells(a + 3, 27) = ladate.Offset(0, -15)
Cells(a + 3, 28) = ladate.Offset(0, -10)
Cells(a + 3, 29) = ladate.Offset(0, -7)
Cells(a + 3, 30) = ladate.Offset(0, -2)
Set ladate = .FindNext(ladate)
Loop While Not ladate Is Nothing And ladate.Address <> firstAddress
Cells(44 + monmois, 18) = Range("D46" )
If Range("D46" ) <> Range("D50" ) Then MsgBox ("Attention, tu as dû oublier de saisir des codes produits, il en manque dans le total!" )
End If
End With
End Sub