Bonjour,
Comment je peux appliquer la marcro ci-dessous automatiquement sur tout mon classeur seulement à partir la feuille 4 à l'infini et les 3 premières feuilles du classeur ne doivent être formatée.
Sub Macro1stepCleaning()
' Keyboard Shortcut: Ctrl+m
'
Rows("1:13").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Columns("C:C").EntireColumn.AutoFit
Columns("D:F").Select
Selection.Delete Shift:=xlToLeft
Columns("D:F").EntireColumn.AutoFit
Columns("D:F").EntireColumn.AutoFit
Columns("G:G").EntireColumn.AutoFit
Columns("H:H").EntireColumn.AutoFit
Columns("I:I").EntireColumn.AutoFit
Columns("J:J").EntireColumn.AutoFit
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select
Application.CutCopyMode = False
Range("A1:Z65000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"AA1"), Unique:=True
ActiveWindow.LargeScroll ToRight:=0
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=5
Range("AA1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=-1
Range("A1").Select
ActiveSheet.Paste
End Sub
Merci d'avance.
Soleil11:
Comment je peux appliquer la marcro ci-dessous automatiquement sur tout mon classeur seulement à partir la feuille 4 à l'infini et les 3 premières feuilles du classeur ne doivent être formatée.
Sub Macro1stepCleaning()
' Keyboard Shortcut: Ctrl+m
'
Rows("1:13").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Columns("C:C").EntireColumn.AutoFit
Columns("D:F").Select
Selection.Delete Shift:=xlToLeft
Columns("D:F").EntireColumn.AutoFit
Columns("D:F").EntireColumn.AutoFit
Columns("G:G").EntireColumn.AutoFit
Columns("H:H").EntireColumn.AutoFit
Columns("I:I").EntireColumn.AutoFit
Columns("J:J").EntireColumn.AutoFit
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select
Application.CutCopyMode = False
Range("A1:Z65000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"AA1"), Unique:=True
ActiveWindow.LargeScroll ToRight:=0
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=5
Range("AA1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=-1
Range("A1").Select
ActiveSheet.Paste
End Sub
Merci d'avance.
Soleil11: