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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
| Sub Mapping_txt()
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Columns("B:B").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("B1:B3000")
Range("B1:B3000").Select
Selection.Copy
Range("C1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("E:E").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("E1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("E1:E3000")
Range("E1:E3000").Select
Selection.Copy
Range("F1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("H:H").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("H1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("H1:H3000")
Range("H1:H3000").Select
Selection.Copy
Range("I1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("K:K").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("K1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("K1:K3000")
Range("K1:K3000").Select
Selection.Copy
Range("L1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("P:P").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("P1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("P1:P3000")
Range("P1:P3000").Select
Selection.Copy
Range("Q1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("Q1").Select
Application.CutCopyMode = False
Columns("U:U").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("U1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("U1:U3000")
Range("U1:U3000").Select
Selection.Copy
Range("V1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("X8").Select
Columns("X:X").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("X1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("X1:X3000")
Range("X1:X3000").Select
Selection.Copy
Range("Y1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("AA:AA").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("AA1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("AA1:AA3000")
Range("AA1:AA3000").Select
Selection.Copy
Range("AB1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("AE:AE").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("AE1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("AE1:AE3000")
Range("AE1:AE3000").Select
Selection.Copy
Range("AF1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("AE1").Select
Application.CutCopyMode = False
Range("AJ1").Select
Selection.FormulaArray = _
"=LEFT(RC[-1]&"" "",MAX(LEN(C[-1])))"
Selection.AutoFill Destination:=Range("AJ1:AJ3000")
Range("AJ1:AJ3000").Select
Selection.Copy
Range("AK1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("AK1").Select
Range("A:B,D:E,G:H,J:K").Select
Range("J1").Activate
Range("A:B,D:E,G:H,J:K,O:P").Select
Range("O1").Activate
Range("A:B,D:E,G:H,J:K,O:P,T:U").Select
Range("T1").Activate
Range("A:B,D:E,G:H,J:K,O:P,T:U,W:X,Z:AA,AD:AE").Select
Range("AD1").Activate
Range("A:B,D:E,G:H,J:K,O:P,T:U,W:X,Z:AA,AD:AE,AI:AJ").Select
Range("AI1").Activate
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
ChDir "C:\OYAK\MONFALCONE"
ActiveWorkbook.SaveAs Filename:="C:\OYAK\MONFALCONE\MONFALCONE.txt", _
FileFormat:=xlUnicodeText, CreateBackup:=False
End Sub |
Partager