ShadowSaxx
Board Regular
- Joined
- Nov 1, 2012
- Messages
- 68
The data set I am working with is reported to me in about 200 .txt files. I have found this code:
posted by ddubnansky:
http://www.mrexcel.com/forum/excel-...xcel-2010-includes-files-sub-directories.html
to create a directory of the files and drop them into a single spreadsheet with the address to the individual files.
I would like to import the data from the .txt files using that address list and drop the data from all the files into 1 worksheet.
Each file has a different address, so the sample data below is from just 1 file within the folder:C:\Users\gudsa_000\Documents\JobCode Automation\Data
Sample data from file: C:\Users\gudsa_000\Documents\JobCode Automation\Data\20140512\DFITR496
Data as viewed in MS NotePad:
Total for CS: 718
Total for GC: 5
Total for ML: 1953
Total for RI: 434
Total for RP: 80621
Total for TR: 10
Total for VA: 1248
Total Page count 84989
I would like the data to populate as follows:
File Name File Folder Group Qty
DFITR496 20140512 CS 718
DFITR496 20140512 GC 5
DFITR496 20140512 ML 1953
DFITR496 20140512 RI 434
DFITR496 20140512 RP 80621
DFITR496 20140512 TR 10
DFITR496 20140512 VA 84989
I do not need the Total Page Count line.
This file reported 7 Groups, but the number of Groups being reported varies. One could have 7, the next could have 10, the next could have just 1. I need to loop through all the files and pull back the data from each file.
Does anyone have any suggestions on how to do this? If so, I would really appreciate any suggestions.
-SS
posted by ddubnansky:
http://www.mrexcel.com/forum/excel-...xcel-2010-includes-files-sub-directories.html
to create a directory of the files and drop them into a single spreadsheet with the address to the individual files.
I would like to import the data from the .txt files using that address list and drop the data from all the files into 1 worksheet.
Each file has a different address, so the sample data below is from just 1 file within the folder:C:\Users\gudsa_000\Documents\JobCode Automation\Data
Sample data from file: C:\Users\gudsa_000\Documents\JobCode Automation\Data\20140512\DFITR496
Data as viewed in MS NotePad:
Total for CS: 718
Total for GC: 5
Total for ML: 1953
Total for RI: 434
Total for RP: 80621
Total for TR: 10
Total for VA: 1248
Total Page count 84989
I would like the data to populate as follows:
File Name File Folder Group Qty
DFITR496 20140512 CS 718
DFITR496 20140512 GC 5
DFITR496 20140512 ML 1953
DFITR496 20140512 RI 434
DFITR496 20140512 RP 80621
DFITR496 20140512 TR 10
DFITR496 20140512 VA 84989
I do not need the Total Page Count line.
This file reported 7 Groups, but the number of Groups being reported varies. One could have 7, the next could have 10, the next could have just 1. I need to loop through all the files and pull back the data from each file.
Does anyone have any suggestions on how to do this? If so, I would really appreciate any suggestions.
-SS
Last edited: