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
| Sub Macro2()
'
' Macro2 Macro
' testtt
'
'
Selection.Insert Shift:=xlToRight
Columns("F:F").Select
Selection.Insert Shift:=xlToRight
Range("E1").Select
ActiveCell.FormulaR1C1 = "Mois"
Range("F1").Select
ActiveCell.FormulaR1C1 = "Annee"
Range("E2").Select
ActiveCell.FormulaR1C1 = "=MONTH(RC[-1])"
Range("E2").Select
Selection.NumberFormat = "0.00"
Selection.AutoFill Destination:=Range("E2:E4")
Range("E2:E4").Select
Range("F2").Select
ActiveCell.FormulaR1C1 = "=YEAR(RC[-2])"
Range("F2").Select
Selection.NumberFormat = "0.00"
Selection.AutoFill Destination:=Range("F2:F4")
Range("F2:F4").Select
Selection.Style = "Comma"
Selection.Style = "Comma"
Selection.NumberFormat = "_(* #,##0_);_(* (#,##0);_(* ""-""_);_(@_)"
Range("E2:E4").Select
End Sub |
Partager