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
| If zone(i, 5) = "XXXX" Then
h2 = h2 + 1
ReDim Preserve tabloa(h2)
tabloa(h2) = Application.Index(zone, i)
tablo(12, 1) = h2
'trouve la valeur min et l'écrit dans le tableau de synthese
tablo(12, 2) = Application.Min(Application.Index(tabloa, , 3))
'trouve la valeur max et l'écrit dans le tableau de synthese
tablo(12, 3) = Application.Max(Application.Index(tabloa, , 3))
'quantité inf 1000 et l'écrit dans le tableau de synthese
If Application.Min(Application.Index(tabloa(h2), , 3)) < 1000 Then
tablo(12, 4) = tablo(12, 4) + 1
End If
'quantité 1000/2000 et l'écrit dans le tableau de synthese
If Application.Min(Application.Index(tabloa(h2), , 3)) >= 1000 And Application.Min(Application.Index(tabloa(h2), , 3)) < 2000 Then
tablo(12, 5) = tablo(12, 5) + 1
End If
'quantité 2000/3000 et l'écrit dans le tableau de synthese
If Application.Min(Application.Index(tabloa(h2), , 3)) >= 2000 And Application.Min(Application.Index(tabloa(h2), , 3)) < 3000 Then
tablo(12, 6) = tablo(12, 6) + 1
End If
'quantité sup 3000 et l'écrit dans le tableau de synthese
If Application.Min(Application.Index(tabloa(h2), , 3)) >= 3000 Then
tablo(12, 7) = tablo(12, 7) + 1
End If
'calculs la moyenne et l'écrit dans le tableau de synthese
tablo(12, 8) = Application.Average(Application.Index(tabloa, , 3))
End If |