Hi All,
I'm looking for a way to (using a macro/vba/etc.?) combine data from (2) .csv files and adhere to a specific layout for importing as a single .csv file.
For example, 2 .csv files would look like this:
File #1: P7,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C12
File #2: C4,S1,S2,S3,S4,S5
1 (P)ackage has 12 (C)artons and each Carton has 5 (S)tickers affixed.
For this example, for the number of P items, n=1, the number of C items, n=12. And the repeating S items, n=5.
Ideally, I'd like to make this a dynamic query where there number of P, C and S items varies.
The desired results (as a single .csv file) would look like this:
P7 C4 S1
P7 C4 S2
P7 C4 S3
P7 C4 S4
P7 C4 S5
P7 C5 S1
P7 C5 S2
P7 C5 S3
P7 C5 S4
P7 C5 S5
P7 C6 S1
P7 C6 S2
P7 C6 S3
P7 C6 S4
P7 C6 S5
... ... ...
... ... ...
P7 C15 S1
P7 C15 S2
P7 C15 S3
P7 C15 S4
P7 C15 S5
the "..." above accounts for the continuation from P7 C7 S1 to P7 C14 S5
Thanks!
Mike
Bookmarks