simsy
New member
Hi,
I need to combine the data in around 30 files into a single Excel file for further analysis. I've been doing this with VBA for around the last 6 years, which, while slow, has worked.
However the number of files I need to combine has grown significantly and my VBA code struggles to finish in a reasonable time.
Now PQ is part of Excel, it seems to make sense to put all this data in the Data Model for my analysis.
The problem I have is, the format of the data is very simple (it's a matrix. . not a table). I thought the very useful Unpivot command would be the answer, but I can't make it work.
If you look at the attached file, you see the simple format that I'm trying to convert in to a table. . . . but the table headings ( week commencing dates ) can all have different start dates.
Could somebody please give me a brief guide of the best way to approach this problem, I think I need to do an independent Unpivot for each file, but that's purely me describing what I think is the solution.
Many thanks
View attachment Ex Inconsistent Column Headings.xlsx
I need to combine the data in around 30 files into a single Excel file for further analysis. I've been doing this with VBA for around the last 6 years, which, while slow, has worked.
However the number of files I need to combine has grown significantly and my VBA code struggles to finish in a reasonable time.
Now PQ is part of Excel, it seems to make sense to put all this data in the Data Model for my analysis.
The problem I have is, the format of the data is very simple (it's a matrix. . not a table). I thought the very useful Unpivot command would be the answer, but I can't make it work.
If you look at the attached file, you see the simple format that I'm trying to convert in to a table. . . . but the table headings ( week commencing dates ) can all have different start dates.
Could somebody please give me a brief guide of the best way to approach this problem, I think I need to do an independent Unpivot for each file, but that's purely me describing what I think is the solution.
Many thanks
View attachment Ex Inconsistent Column Headings.xlsx