El Cid
Member
- Joined
- Aug 22, 2016
- Messages
- 52
- Reaction score
- 0
- Points
- 6
- Location
- Greenville, SC
- Excel Version(s)
- Excel 2016
I'm trying to merge two CSV files of similar data from different time periods. I had to break them up by time period, example, Jan-Mar and Apr-Jun because the output software limits the output to 256 columns. I normally only have to merge 1 of these files with a "master file" that contains all of my GL account numbers and I'm having no problem with that...but this wrench was thrown into the mess and I'm stumped:
Example Master CVS File:
41105 Contract Labor
41110 Contract Materials
41111 Contract Equipment Rental
The detail data contains by job number across the top the with the GL numbers along the left side like:
CSV File 1:
45678 45894
41105 Contract Labor 1500.00 1400.00
41111 Contract Equipment Rental 4500.00 5500.00
There is the possibility that the detail CSV files will have the same job number listed twice. These are a duplicate, but not a duplicate. Their totals need to be added together and duplicate eliminated.
CSV File 2:
45678
41105 Contract Labor 1500.00
41111 Contract Equipment Rental 4500.00
Final merge should look like this:
CSV File Merge:
45678 45894
41105 Contract Labor 3000.00 1400.00
41110 Contract Materials
41111 Contract Equipment Rental 9000.00 5500.00
After the merge and add I plan to transpose the final for output.
Anyone have a suggestion to slay this monster? Thanks
I'm thinking that I may have to do both separately, dump to Excel and use pivot tables to marry them (do the addition), but would prefer to do it all in PQ.
Example Master CVS File:
41105 Contract Labor
41110 Contract Materials
41111 Contract Equipment Rental
The detail data contains by job number across the top the with the GL numbers along the left side like:
CSV File 1:
45678 45894
41105 Contract Labor 1500.00 1400.00
41111 Contract Equipment Rental 4500.00 5500.00
There is the possibility that the detail CSV files will have the same job number listed twice. These are a duplicate, but not a duplicate. Their totals need to be added together and duplicate eliminated.
CSV File 2:
45678
41105 Contract Labor 1500.00
41111 Contract Equipment Rental 4500.00
Final merge should look like this:
CSV File Merge:
45678 45894
41105 Contract Labor 3000.00 1400.00
41110 Contract Materials
41111 Contract Equipment Rental 9000.00 5500.00
After the merge and add I plan to transpose the final for output.
Anyone have a suggestion to slay this monster? Thanks
I'm thinking that I may have to do both separately, dump to Excel and use pivot tables to marry them (do the addition), but would prefer to do it all in PQ.