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
|
montext = "AAAA"
For i = 1 To 12
With Application.WorksheetFunction
tablo(i, 1) = .CountIf(maplage2, montext)
tablo(i, 2) = .MinIfs(MaPlage, maplage2, montext)
tablo(i, 3) = .MaxIfs(MaPlage, maplage2, montext)
tablo(i, 4) = .CountIfs(maplage2, montext, MaPlage, "<1000")
tablo(i, 5) = .CountIfs(maplage2, montext, MaPlage, ">=1000", MaPlage, "<2000")
tablo(i, 6) = .CountIfs(maplage2, montext,MaPlage, ">=2000", MaPlage, "<3000")
tablo(i, 7) = .CountIfs(maplage2, montext, MaPlage, ">=3000")
tablo(i, 8) = .AverageIfs(MaPlage, maplage2, montext)
End With
If i = 1 Then
montext = Replace(montext, "AAAA", "AAAB")
End If
If i = 2 Then
montext = Replace(montext, "AAAB", "AAAC")
End If
If i = 3 Then
montext = Replace(montext, "AAAC", "AAAD")
End If
If i = 4 Then
montext = Replace(montext, "AAAD", "AAAE")
End If
If i = 5 Then
montext = Replace(montext, "AAAE", "AAAF")
End If
next i |
Partager