1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
rang3 = rang3 + 1
l = l + 1
Next
l2 = 0: rang3 = 1: l3 = 0: toto = 0
For l2 = l3 To N
If Cells(rang3, 3) >= "01/01/*" And Cells(rang3, 3) <= "31/01/*" Then
toto = Cells(rang3, 11).Value
JanvMinu = JanvMinu + toto
ElseIf Cells(rang3, 3) >= "01/02/*" And Cells(rang3, 3) <= "31/02/*" Then
toto = Cells(rang3, 11).Value
FevrMinu = FevrMinu + toto
ElseIf Cells(rang3, 3) >= "01/03/*" And Cells(rang3, 3) <= "31/03/*" Then
toto = Cells(rang3, 11).Value
Marsminu = Marsminu + toto
ElseIf Cells(rang3, 3) >= "01/04/*" And Cells(rang3, 3) <= "31/04/*" Then
toto = Cells(rang3, 11).Value
AvrMinu = AvrMinu + toto
ElseIf Cells(rang3, 3) >= "01/05/*" And Cells(rang3, 3) <= "31/05/*" Then
toto = Cells(rang3, 11).Value
MaiMinu = MaiMinu + toto
ElseIf Cells(rang3, 3) >= "01/06/*" And Cells(rang3, 3) <= "31/06/*" Then
toto = Cells(rang3, 11).Value
JuinMinu = JuinMinu + toto
ElseIf Cells(rang3, 3) >= "01/07/*" And Cells(rang3, 3) <= "31/07/*" Then
toto = Cells(rang3, 11).Value
JuilMinu = JuilMinu + toto
ElseIf Cells(rang3, 3) >= "01/08/*" And Cells(rang3, 3) <= "31/08/*" Then
toto = Cells(rang3, 11).Value
AoutMinu = AoutMinu + toto
ElseIf Cells(rang3, 3) >= "01/09/*" And Cells(rang3, 3) <= "31/09/*" Then
toto = Cells(rang3, 11).Value: MsgBox toto
SeptMinu = SeptMinu + toto
ElseIf Cells(rang3, 3) >= "01/10/*" And Cells(rang3, 3) <= "31/10/*" Then
toto = Cells(rang3, 11).Value
OctMinu = OctMinu + toto
ElseIf Cells(rang3, 3) >= "01/12/*" And Cells(rang3, 3) <= "31/12/*" Then
toto = Cells(rang3, 11).Value
NovMinu = NovMinu + toto
ElseIf Cells(rang3, 3) >= "01/12/*" And Cells(rang3, 3) <= "31/12/*" Then
toto = Cells(rang3, 11).Value
DecMinu = DecMinu + toto
End If
rang3 = rang3 + 1
l3 = l3 + 1
Next
ActiveWorkbook.Close
Call afficheBP |
Partager