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
| Sub FORMATO()
'
' FORMATO Macro
'
' Touche de raccourci du clavier: Ctrl+Shift+F
'
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, _
1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12 _
, 1), Array(13, 1), Array(14, 1), Array(15, 1)), TrailingMinusNumbers:=True
Range("P3").Select
ActiveCell.FormulaR1C1 = "TAXA MÊS"
Range("Q3").Select
ActiveCell.FormulaR1C1 = "TAXA ANO"
Range("R3").Select
ActiveCell.FormulaR1C1 = "COEFF"
Range("S3").Select
ActiveCell.FormulaR1C1 = "EQUA MONT"
Range("T3").Select
ActiveCell.FormulaR1C1 = "EQUA REDE"
Range("U3").Select
ActiveCell.FormulaR1C1 = "EQUA TOTAL"
Range("P4").Select
ActiveCell.FormulaR1C1 = "=RC[-6]/100"
Range("P4").Select
Selection.AutoFill Destination:=Range("P4:P147")
Range("P4:P147").Select
Range("Q4").Select
ActiveCell.FormulaR1C1 = "=RC[-6]/100"
Range("Q4").Select
Selection.AutoFill Destination:=Range("Q4:Q147")
Range("Q4:Q147").Select
Range("R4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-6]>1,RC[-6]/100,RC[-6])"
Range("R4").Select
Selection.AutoFill Destination:=Range("R4:R147")
Range("R4:R147").Select
Range("S4").Select
ActiveCell.FormulaR1C1 = "=RC[-6]/100"
Range("S4").Select
Selection.AutoFill Destination:=Range("S4:S147")
Range("S4:S147").Select
Range("T4").Select
ActiveCell.FormulaR1C1 = "=RC[-6]/100"
Range("T4").Select
Selection.AutoFill Destination:=Range("T4:T147")
Range("T4:T147").Select
Range("U4").Select
ActiveCell.FormulaR1C1 = "=RC[-2]+RC[-1]"
Range("U4").Select
Selection.AutoFill Destination:=Range("U4:U147")
Range("U4:U147").Select
Range("A2").Select
End Sub |
Partager