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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
| Sub Synthèse01()
'
' Macro1 Synthèse01
'
'
Sheets("Synthèse").Select
ActiveSheet.Unprotect
Sheets("matrice").Select
ActiveSheet.Unprotect
Columns("B:C").Select
Selection.Copy
Sheets("Synthèse").Select
Columns("B:C").Select
Range("B6").Activate
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Columns("B:C").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("matrice").Select
Columns("MH:MH").Select
Selection.Copy
Columns("ME:ME").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("ME8").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Cuml Av."
Columns("LY:MH").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Synthèse").Select
Columns("E:N").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("matrice").Select
Range("MJ10").Select
ActiveCell.FormulaR1C1 = "=IF(MONTH(R7C3)=1,RC[-5],0)"
Range("MJ10").Select
Selection.Copy
Range("MJ10:MJ500").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("MJ10:MJ500").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.CutCopyMode = False
Range("C7").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Columns("MJ:MM").Select
Selection.Copy
Range("C7").Select
Sheets("Synthèse").Select
Range("P1").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("E:H").Select
Selection.ColumnWidth = 7
Columns("I:I").Select
Selection.ColumnWidth = 0.5
Columns("J:N").Select
Selection.ColumnWidth = 7
Columns("O").Select
Selection.ColumnWidth = 0.5
Columns("Q:AN").Select
Selection.ColumnWidth = 4
Columns("P").Activate
Selection.ColumnWidth = 7
Range("C7").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("matrice").Select
Range("C7").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWindow.LargeScroll ToRight:=-1
Sheets("Procèdure").Select
End Sub |
Partager