Hello
I found this interesting piece of code here in the forum which reads multiple text files including filename into Excel:
I want to change it slightly but don't know how to do it:
I have a set of textfiles which all have several rows with several fields (separated by comma or semicolon).
What I want: Import all files from the given directory, write in the first column the filename (repeat it for all rows of that file), then fill the following columns with the comma-separated fields.
Example:
File1 has this data
A;999;777;222
B;2,3,4
File2 has this data
H;888,777,211
J:;82,222,111
The macro should now import all files in excel so that I have the following data in Excel
File1;A;999;777;222
File1;B;2,3,4
File2;H;888,777,211
File2;J;282,222,111
Is this possible? Any help or tipp appreciated,
thanks
Bookmarks