How about a macro to do it:
Dim C_ell As Range
Open "C:\Data\Data.txt" For Output As 1
'Above you can change the path and file name
Print #1, Chr(34) & "Custmerno" & Chr(34) & " " & _
Chr(34) & "Name" & Chr(34) & " " & _
Chr(34) & "Address" & Chr(34) & " " & _
Chr(34) & "zip code" & Chr(34) & " " & _
Chr(34) & "zip code name" & Chr(34) & " " & _
Chr(34) & "Phone" & Chr(34) & " " & _
Chr(34) & "MecCode" & Chr(34) & " " & _
Chr(34) & "SalesCode" & Chr(34)
For Each C_ell In Range("A2", Cells(Rows.Count, 1).End(xlUp))
Print #1, Chr(34) & C_ell.Text & Chr(34) & " " & _
Chr(34) & C_ell.Offset(0, 1).Text & Chr(34) & " " & _
Chr(34) & C_ell.Offset(0, 2).Text & Chr(34) & " " & _
Chr(34) & C_ell.Offset(0, 3).Text & Chr(34) & " " & _
Chr(34) & C_ell.Offset(0, 4).Text & Chr(34) & " " & _
Chr(34) & C_ell.Offset(0, 5).Text & Chr(34) & " " & _
Chr(34) & C_ell.Offset(0, 17).Text & Chr(34) & " " & _
Chr(34) & C_ell.Offset(0, 10).Text & Chr(34)
Next
Close #1
End Sub
I did not know which column is the MecCode so I put it in column 17 which is actually blank. As you certainly know where is this information, you can change this in the loop part.
It is not a sophisticated macro but it works.
Hope this helps!
Bookmarks