@Perceval973
Il manque une partie à ta macro que tu as mis au
post #4
Cela sera mieux en ayant la totalité du code
La voici
Sub Nettoyage_Synthese()
'
' Nettoyage_Synthese Macro
'
Cells.Select
Selection.UnMerge
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Cells.Select
Selection.EntireColumn.Hidden = False
Range("A:A,C:C,E:E,F:F,G:G,H:H,I:I,K:K,L:L,M:M,N:N,O:O,P
😛,Q:Q,R:R,S:S,T:T"). _
Select
Range("T1").Activate
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$A$414").AutoFilter Field:=1, Criteria1:="=Poste", _
Operator:=xlOr, Criteria2:="="
ActiveWindow.SmallScroll Down:=223
Cells.Select
Selection.Delete Shift:=xlUp
ActiveWorkbook.Worksheets("Mercredi L1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Mercredi L1").Sort.SortFields.Add2 Key:=Range( _
"A1:A414"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Mercredi L1").Sort
.SetRange Range("A1:U414")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Columns("A:A").Select
Selection.FormatConditions.AddUniqueValues
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
Selection.FormatConditions(1).DupeUnique = xlDuplicate
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Columns("C:C").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="=29"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Range("A1").Select
End Sub