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
| For c = 0 To 23
Moyenne = 0
somme = 0
NbRevision = 0
x = 0
z = 10000
For a = 2 To j
If Mid(Cells(a, 3), 1, 2) = 31 And Cells(a, 2) = c Then
NbRevision = NbRevision + 1
somme = Cells(a, 7).Value + somme
Sheets("synthese").Cells((c + 2), 4).Value = NbRevision
Sheets("synthese").Cells((c + 2), 5).Value = somme
If Cells(a, 7) > x And Cells(a, 2) = c Then
x = Cells(a, 7).Value
Sheets("synthese").Cells((c + 2), 7).Value = x
If Cells(a, 7) < z And Cells(a, 2) = c Then
z = Cells(a, 7).Value
Sheets("synthese").Cells((c + 2), 8).Value = z
End If
End If
End If
Next a
If NbRevision > 0 Then
Moyenne = somme / NbRevision
Sheets("synthese").Cells((c + 2), 6).Value = Moyenne
End If
Next c |
Partager