Bonne jour à tous,
Comme convenu voici le VBA de la macro.
Bonne journée.
Sub f2_Macro()
'
' F2_Macro Macro
'
Range("C:C,D
").Select
Range("D1").Activate
Selection.Delete Shift:=xlToLeft
Range("I:I,J:J,K:K").Select
Range("K1").Activate
Selection.Delete Shift:=xlToLeft
Range("5:5,6:6,7:7").Select
Range("A7").Activate
Selection.Delete Shift:=xlUp
'
iRow = Range("L" & Rows.Count).End(xlUp).Row
Range("A10:L" & iRow).Select
'
ActiveSheet.ListObjects.Add(xlSrcRange,
Range("A10:L" & iRow), , xlYes).Name = _
"Tableau1"
Range("Tableau1[#All]").Select
ActiveSheet.ListObjects("Tableau1").TableStyle = "TableStyleMedium4"
ActiveWindow.SmallScroll Down:=-6
ActiveWorkbook.Worksheets(1).ListObjects("Tableau1"). _
Sort.SortFields.Clear
ActiveWorkbook.Worksheets(1).ListObjects("Tableau1"). _
Sort.SortFields.Add Key:=Range("Tableau1[[#All],[Remaining]]"), SortOn:= _
xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets(1).ListObjects("Tableau1" _
).Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveWindow.SmallScroll Down:=-12
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$I10=0"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.599963377788629
End With
Selection.FormatConditions(1).StopIfTrue = False
Range("A1").Select
Sheets(2).Select
Range("C:C,D
").Select
Range("D1").Activate
Selection.Delete Shift:=xlToLeft
'
iRow = Range("H" & Rows.Count).End(xlUp).Row
Range("A6:H" & iRow).Select
'
ActiveWindow.SmallScroll Down:=-72
ActiveSheet.ListObjects.Add(xlSrcRange,
Range("A6:H" & iRow), , xlYes).Name = _
"Tableau2"
Range("Tableau2[#All]").Select
ActiveSheet.ListObjects("Tableau2").TableStyle = "TableStyleMedium18"
ActiveWindow.SmallScroll Down:=-18
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$H6=""Missed"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 11250687
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Range("A1").Select
Sheets(1).Select
Range("A1").Select
End Sub
MERCI à tous pour l'aide.