Looping thru multiple files to produce a consolidated summary by Code

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Filtering the postings on this subject did not produce satisfying
results.

Three worksheets to start with :
1. Code Table
Code Desc
A Code A Desc
B Code B Desc
C Code C Desc
D Code D Desc
E Code E Desc

2. Period1 Data
Code Value Date
B 2 .....
B 6 .....
D 3 .....

3. Period2 Data
Code Value Date
A 5 .....
B 3 .....
C 7 .....
D 4 .....
F 8 ......

Desired Output on the 4th work***,
considering that the F code was not in the original Code Table,
implying prompting for creation on the fly during the looping
Assume all the WorkSheets are in the same Workbook

Resulting Summary Table

Code Description Period1 Period2 Total
A Code A Desc 5 5
B Code B Desc 8 3 11
C Code C Desc 7 7
D Code D Desc 3 4 7
E Code E Desc 0 0
F Code F Desc 8 8
T O T A L 11 27 38

Can you help me,
Thank you

Celeste

.


Quantcast