View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Geoffro Geoffro is offline
external usenet poster
 
Posts: 2
Default How do I import text file, analyze data, export results, open next file

Ok, here's my dilemma...

I have about 3000 text files that I want to import one at a time, do
some manipulation to the data, and import a result into a new file or
worksheet where I can then do some analyzing on that data. Oh, one
more thing, I want to be able to do this with a macro. I have a list
of all of the file names and they can be imported into excel. How do I
import the file data using that file name in the workbook?

Here's an example....

I have a file named "file1.txt". I want to import the data from
file1.txt automatically. From there I want to sort the data, do some
calculations, and export the results into a new worksheet or text file
where each line looks like this:

File1,45,686,yes,12342

Afterwards, I want to clear the worksheet and move on to the next file
in the list named "file2.txt" and do the same calculations and add
it to the result worksheet or text file like this:

File1,45,686,yes,12342
File2,44,632,no,14432

Finally, after all 3000+ files have been analyzed I want to take the
finished worksheet or text file and do some other analyzing on it.

Any help is greatly appreciated here and I am more than willing to
compensate someone for their time if they were to help get this done.
I can be contacted at

Thanks,

Geoff