I import a text file via VBA to a sheet called "TextFile". There are headings in row 1.
Columns A-G have imported data with the exception of column D which is blank.
I have another sheet called "Reformatted" (no headings) into which I want TextFile!An:Cn then a reformatted column E.
I do a VLOOKUP on the Master sheet to change what is in column E from the TextFile to either a 10, OT, or DT and put the results in column L of the TextFile.
The L column in the TextFile is correct with OT, a text 10, or a DT depending on the VLOOKUP. But, when I copy that column from the TextFile sheet to the Reformatted sheet I get all 0s in the E column. That's my first issue.
The never ending leading issue that I sometimes resolve but it's a mystery how it was resolved as my VBA is only FAIR to AWFUL.
I want the result "Reformatted" sheet to have leading 0s in column F and retained when I export the "Reformatted" sheet to a text file result.
I'm not getting the "Reformatted" sheet to show leading zeros, so the resulting output doesn't either.
Thanks for any help in advance.
If anyone has the patience for this...the third issue is that column A in the TextFile is TEXT. I comes into the sheet with double quotes around it. Therefore, when it's output as a text file, Excel add more quotes and now I have """" before and after the text in column A. I either want one set of " or NONE. Phew!
Bookmarks