Experimente
Sub ImpCamb()
Dim ws As Workbook
Set ws = ThisWorkbook
'Alterar caminho para o arquivo txt
Workbooks.OpenText Filename:="C:DownloadsCAMBRIDGE_teste.txt", Origin:= _
xlMSDOS, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote _
, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:= _
False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1) _
, Array(3, 1), Array(4, 1), Array(5, 8), Array(6, 8), Array(7, 1), Array(8, 1), Array(9, 1), _
Array(10, 1)), TrailingMinusNumbers:=True
For x = 1 To Cells(Cells.Rows.Count, "A").End(xlUp).Row
ws.Sheets("Plan2").Range("A" & x) = Range("A" & x) & Range("B" & x)
ws.Sheets("Plan2").Range("B" & x) = Range("C" & x) & Range("D" & x)
ws.Sheets("Plan2").Range("C" & x) = Range("E" & x)
ws.Sheets("Plan2").Range("D" & x) = Range("F" & x)
ws.Sheets("Plan2").Range("E" & x) = Range("G" & x)
ws.Sheets("Plan2").Range("F" & x) = Range("H" & x)
ws.Sheets("Plan2").Range("G" & x) = Range("I" & x)
ws.Sheets("Plan2").Range("H" & x) = Range("J" & x)
Next
ActiveWindow.Close
Cells.Select
Cells.EntireColumn.AutoFit
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 23/03/2014 7:57 am