We can get you close - the headers and sub headers may not be easily possible though. I would do a Transpose on the data, form your new headers, and Crosstab it back! Here is a start you can work with:
How do you input multiples files but want a company code identifier for each column.yxmd