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
| Application.ScreenUpdating = False
nom = Range("E10")
If nom = "xxx" Then
ChDir "T:\"
Workbooks.Open Filename:="\\chemin\edenvg.csv"
Range("J6").Select
End If
ActiveCell.FormulaR1C1 = "=+TRIM(RC[-9])"
Range("J6").Select
Selection.AutoFill Destination:=Range("J6:S6"), Type:=xlFillDefault
Range("J6:S6").Select
Range("S6").Select
Selection.ClearContents
Range("J6:R6").Select
Selection.AutoFill Destination:=Range("J6:R7401"), Type:=xlFillDefault
Range("J6:R7401").Select
Selection.Copy
ActiveWindow.ScrollColumn = 1
ActiveWindow.LargeScroll Down:=-18
ActiveWindow.ScrollRow = 1
Range("A6").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Columns("J:BF").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Columns("I:I").Select
Selection.Replace What:=".", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByColumns, MatchCase:=False
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByColumns, MatchCase:=False
Selection.NumberFormat = "0"
Columns("A:A").Select
Selection.Replace What:="-", Replacement:="-", LookAt:=xlPart, _
SearchOrder:=xlByColumns, MatchCase:=False
Selection.NumberFormat = "dd/mm/yy"
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
Columns("D:D").Select
Selection.Copy
Range("B1").Select
ActiveSheet.Paste
Columns("D:D").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Range("A6:I4995").Select
Selection.Copy
ChDir "X:\ etc"
Workbooks.Open Filename:= _
"\\chemin\fichier.xls"
Range("A4").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.ScrollRow = 2140
ActiveWindow.ScrollRow = 1
Columns("C:C").Select
Selection.Replace What:="2004", Replacement:="04", LookAt:=xlPart, _
SearchOrder:=xlByColumns, MatchCase:=False
Windows("edenvg.csv").Activate
ActiveWindow.Close
End Sub |
Partager