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 68 69 70 71 72
| Sub TEST()
'
' TEST Macro
'
'
Application.ScreenUpdating = False
Dim Ind As Long, Ind2 As Long
Dim Titre(4) As String, TypeAno(20) As String
Titre(1) = "PROJET"
Titre(2) = "INDUSTRIEL"
Titre(3) = "OUTILS"
Titre(4) = "SUPPORT SGP"
TypeAno(1) = "Absence de natif"
TypeAno(2) = "Autre"
TypeAno(3) = "Baghera Doc"
TypeAno(4) = "Contraire règles CNES/périmètre"
TypeAno(5) = "Contrôles de base hors gestion de conf."
TypeAno(6) = "Crypt And Share"
TypeAno(7) = "Doc. non conforme"
TypeAno(8) = "Doc. non exploitable"
TypeAno(9) = "Doublon"
TypeAno(10) = "Erreur création DT"
TypeAno(11) = "Erreur de choix de projet"
TypeAno(12) = "Erreur liste de diffusion"
TypeAno(13) = "Hors format ECSS"
TypeAno(14) = "Hors format PDF-A"
TypeAno(15) = "Manque infos actions"
TypeAno(16) = "Manque infos enregistrement"
TypeAno(17) = "PDF non normalisé"
TypeAno(18) = "Rediffusion"
TypeAno(19) = "Réseau"
TypeAno(20) = "Traitement"
ligne = 5
While ligne < 500
NomDuProjet = Cells(ligne, 2).Value
nom = Application.WorksheetFunction.CountIf(Range("Anomalies.xlsx!$N$4:$N$1120"), NomDuProjet)
If nom = 0 Then
ligne = ligne + 1
Else
nom = Application.WorksheetFunction.CountIf(Range("Anomalies.xlsx!$N$4:$N$1120"), NomDuProjet)
Cells(ligne, 7).ClearContents
Cells(ligne, 8).ClearContents
Cells(ligne, 7).Value = nom
For Ind = 1 To 4
Domaine = Application.WorksheetFunction.CountIfs(Range("Anomalies.xlsx!$N$4:$N$1120"), NomDuProjet, _
Range("Anomalies.xlsx!$K$4:$K$1120"), Titre(Ind))
Cells(ligne, 8).Value = Cells(ligne, 8).Value & IIf(Domaine <> 0, Domaine & " " & Titre(Ind) & vbCrLf, "")
For Ind2 = 1 To 20
TypeAnomalie = Application.WorksheetFunction.CountIfs(Range("Anomalies.xlsx!$N$4:$N$1120"), NomDuProjet, _
Range("Anomalies.xlsx!$K$4:$K$1120"), Titre(Ind), Range("Anomalies.xlsx!$J$4:$J$1120"), TypeAno(Ind2))
Cells(ligne, 8).Value = Cells(ligne, 8).Value & IIf(TypeAnomalie <> 0, TypeAnomalie & " " & TypeAno(Ind2) & vbCrLf, "")
Next Ind2
Next Ind
ligne = ligne + 1
End If
Wend
End Sub |
Partager