Sub Mise_A_Jour()
'*************************************************************************
'*************************************************************
'**************************************************************
'*************************************************************************
'Pour info il existe en tout 4 feuilles par secteur dont 3 cachées (pour les stats)
Dim plage As Range
Dim cel As Range
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Effacer les cellules de chaque feuille (secteur par secteur)
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
Sheets("MDCcloses").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("MDCouvertes").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("ActionsCloses").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("AQS").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("AQS (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("AQS (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("AQS (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("AQO").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("AQO (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("AQO (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("AQO (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("EHS").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("EHS (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("EHS (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("EHS (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("REGL").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("REGL (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("REGL (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("REGL (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("INDUS").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("INDUS (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("INDUS (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("INDUS (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("INGE").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("INGE (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("INGE (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("INGE (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("SUPPLY").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("SUPPLY (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("SUPPLY (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("SUPPLY (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("LABO").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("LABO (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("LABO (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("LABO (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("SGPCOR").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("SGPCOR (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("SGPCOR (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("SGPCOR (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("COSMETO").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("COSMETO (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("COSMETO (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("COSMETO (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("FABFS").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("FABFS (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("FABFS (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("FABFS (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("CDTFS").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("CDTFS (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("CDTFS (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("CDTFS (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("MAINT").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("MAINT (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("MAINT (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("MAINT (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("Qualite").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("Qualite (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("Qualite (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("Qualite (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________
'-----------
Sheets("PROD").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("PROD (2)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("PROD (3)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'-----------
Sheets("PROD (4)").Select
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).ClearContents
End If
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Mise à jour des feuilles (secteur par secteur)
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'1 / MAJ
'-- Mise à jour des MDC closes --
Sheets("ListeMDC").Select '(1)
Selection.AutoFilter Field:=14, Criteria1:="<>" '(2)
If Cells(5, 1).End(xlDown).Row > 5 Then '(3)
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select '(4)
Selection.Copy '(5)
Sheets("MDCcloses").Select '(6)
Range("A6").Select '(8)
ActiveSheet.Paste '(9)
End If
'+++++Explications++++++ :
'(1) permet la sélection de la feuille ListeMDC
'(2) permet de filtrer les données, <> signie "non vides"
'pour que la ligne ci dessus fonctionne,
'il faut au préalable activer les filtres de la colonne A à N sur la ListeMDC
'Si ce n'est pas fait :rajouter Range("A5:N5").select et selection.autofilter
'(3) Pose la condition : si détecte plus de 5 lignes la copie s'effectue.
'Autrement dit s'il n'y a pas de MDC dans la feuille la copie ne se fait pas. Cela évitera d'obenir deux lignes de titres lors d'une copie.
'If Range("A65536").End(xlUp).Row > 5 Then (= autre façon de procéder en partant de la dernière ligne)
'(4) Cherche la première ligne complétée et sélectionne toutes les autres lignes non vides de la colonne 1 à 14 (A à N)
'(5) Copie la sélection
'(6) Sélectionne la feuille de destination
'(7) Supprime le contenu des cellules (en dessous de la ligne 5)
'(8) Se positionne sur la première ligne colone A
'(9) Coller la sélection
'Si nécessaire enlever la sélection des MDC closes en désactivant le filtre
'Sheets("ListeMDC").Select
'Selection.AutoFilter Field:=14 --> désélectionne la colonne 14, càd N
'_____________________________________________'
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=13
Selection.AutoFilter Field:=14
'2/ --Mise à jour suite--
'MDC ouvertes :
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("MDCouvertes").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'AQS:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="AQS"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQS").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'AQO:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="AQO"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQO").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'EHS:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="EHS"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("EHS").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'REGL:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="REGL"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("REGL").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INDUS:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="INDUS"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INDUS").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INGE:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="INGENIERIE"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INGE").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SUPPLY:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="SUPPLY"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SUPPLY").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'LABO:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="LABO"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("LABO").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SG-PC-OR:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="SIROP-CREME-OROKEN"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SGPCOR").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'COSMETO:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="COSMETO"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("COSMETO").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'FAF FS:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="FAB FS"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("FABFS").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'CDT FS:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="CDT FS"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("CDTFS").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'MAINT:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="MAINT"
If Cells(5, 1).End(xlDown).Row > 5 Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("MAINT").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'Qualité:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="Q"
'Ici je remplace la condition : If Cells(5, 1).End(xlDown).Row > 5 Then par celle-ci :
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("Qualite").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'PROD:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
Selection.AutoFilter Field:=11, Criteria1:="PROD"
'Ici je remplace la condition : If Cells(5, 1).End(xlDown).Row > 5 Then par celle-ci :
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("PROD").Select
Range("A6").Select
ActiveSheet.Paste
End If
'la condition change car la feuille PROD n'est quasiment jamais remplie. et cela evite que trop de lignes ne se copient.
'Rétablir la liste MDC sans les filtres
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11
Selection.AutoFilter Field:=14
Selection.AutoFilter Field:=13
'***
'POUR TOUTES LES MACRO QUI SUIVENT JE MET LA CONDITION : If Range("A6") = "<>" Then
'Si un problème se pose à l'avenir il faudra remettre :
'If Cells(5, 1).End(xlDown).Row > 5 Then
'Ou alors : If Not Isempty(Range("A6:A2000") Then
'Ou If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
'***
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Mise à jour des pages cachées : actions closes des MDC en cours(secteur par secteur)
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'dans le but de compléter les statistiques.
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=14, Criteria1:=""
'-----------
'AQS2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="AQS"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQS (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'AQO2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="AQO"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQO (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'EHS2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="EHS"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("EHS (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'REGL2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="REGL"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("REGL (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INDUS2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="INDUS"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INDUS (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INGE2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="INGENIERIE"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INGE (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SUPPLY2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="SUPPLY"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SUPPLY (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'LABO2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="LABO"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("LABO (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SG-PC-OR2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="SIROP-CREME-OROKEN"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SGPCOR (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'COSMETO2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="COSMETO"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("COSMETO (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'FAF FS2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="FAB FS"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("FABFS (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'CDT FS2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="CDT FS"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("CDTFS (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'MAINT2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="MAINT"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("MAINT (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'Qualité2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="Q"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("Qualite (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'PROD2:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11, Criteria1:="PROD"
Selection.AutoFilter Field:=13, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("PROD (2)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'Rétablir la liste MDC sans les filtres
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11
Selection.AutoFilter Field:=14
Selection.AutoFilter Field:=13
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Mise à jour des pages cachées : MDC initiées non closes (secteur par secteur)
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'-----------
'AQS3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="AQS"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQS (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'AQO3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="AQO"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQO (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'EHS3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="EHS"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("EHS (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'REGL3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="REGL"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("REGL (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INDUS3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="INDUS"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INDUS (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INGE3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="INGENIERIE"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INGE (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SUPPLY3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="SUPPLY"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SUPPLY (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'LABO3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="LABO"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("LABO (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SG-PC-OR3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="SIROP-CREME-OROKEN"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SGPCOR (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'COSMETO3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="COSMETO"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("COSMETO (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'FAF FS3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="FAB FS"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("FABFS (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'CDT FS3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="CDT FS"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("CDTFS (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'MAINT3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="MAINT"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("MAINT (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'Qualité3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="Q"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("Qualite (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'PROD3:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="PROD"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("PROD (3)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'Rétablir la liste MDC sans les filtres
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11
Selection.AutoFilter Field:=14
Selection.AutoFilter Field:=13
Selection.AutoFilter Field:=5
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Mise à jour des pages cachées : MDC initiées closes (secteur par secteur)
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'-----------
'AQS4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="AQS"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQS (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'AQO4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="AQO"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("AQO (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'EHS4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="EHS"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("EHS (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'REGL4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="REGL"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("REGL (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INDUS4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="INDUS"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INDUS (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'INGE4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="INGENIERIE"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("INGE (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SUPPLY4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="SUPPLY"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SUPPLY (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'LABO4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="LABO"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("LABO (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'SG-PC-OR4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="SIROP-CREME-OROKEN"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("SGPCOR (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'COSMETO4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="COSMETO"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("COSMETO (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'FAF FS4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="FAB FS"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("FABFS (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'CDT FS4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="CDT FS"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("CDTFS (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'MAINT4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="MAINT"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("MAINT (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'Qualité4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="Q"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("Qualite (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'-----------
'PROD4:
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=5, Criteria1:="PROD"
Selection.AutoFilter Field:=14, Criteria1:="<>"
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("PROD (4)").Select
Range("A6").Select
ActiveSheet.Paste
End If
'Rétablir la liste MDC sans les filtres
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11
Selection.AutoFilter Field:=14
Selection.AutoFilter Field:=13
Selection.AutoFilter Field:=5
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Nombre total d'actions closes
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Actions closes :
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=13, Criteria1:="<>"
Selection.AutoFilter Field:=14, Criteria1:=""
If Not IsEmpty(Cells(5, 1).End(xlDown)) Then
Range(Cells(6, 1), Cells(Cells(5, 1).End(xlDown).Row, 14)).Select
Selection.Copy
Sheets("ActionsCloses").Select
Range("A6").Select
ActiveSheet.Paste
End If
'Rétablir la liste MDC sans les filtres
Sheets("ListeMDC").Select
Selection.AutoFilter Field:=11
Selection.AutoFilter Field:=14
Selection.AutoFilter Field:=13
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
'Retour page d'accueil pour message de confirmation de la mise à jour et sauvegarde)
'___________________________________________________________________________________
'-----------------------------------------------------------------------------------
Sheets("Accueil").Select
'ActiveWorkbook.Save '=permet de sauvegarder après la mise à jour
MSGBOX "La mise à jour a été effectuée" & vbLf & "Bonne journée"
End Sub