Excel VBA - Import Data for manipulation from multiple text files

  • Thread starter Thread starter ZX210
  • Start date Start date
Z

ZX210

I have to gather information from an unknown number of text files wit
unknown filenames and import it into an excel document for dat
manipulation. Each .txt file contains a series of data points entere
by a data collection device. Each trial creates a new txt file an
data file with no extention. Both can be imported into excel, but
need to program a macro that will import data from these unknown numbe
of files into a single worksheet in which the data can be compared an
analyzed.

I was wondering if there was a way to search through a folder and mov
from one file to the next possibly pulling title information along wit
the data within the file.

There are usually 30 to 40 files each containing amost 100 data point
each. The macro would prevent the tedious task of opening/importin
all txt files and pasting them in an excel sheet. Please contact me a
(e-mail address removed) if anyone has any pointers of functions that
might be able to research and apply. Thanks
 
See the examples for the Dir function in VB Editor help which will do
what you want.

Make a new post with a copy of your code if you get stuck.
 
Back
Top