Hello,
I am looking for some assistance in writing a macro to transpose timespread data that is coming out of a program that I use. I need to be able to make a calculation on the data, then put it back into a pivot table to spread it again by period. I only need help getting the data from timespread to data table. See example below. The columns 1 and 2 need to be repeated for every period. The periods, will be changing every time i run the report.
Thank you for your help.
<colgroup><col><col><col><col><col><col span="4"><col></colgroup><tbody>
</tbody>
<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
I am looking for some assistance in writing a macro to transpose timespread data that is coming out of a program that I use. I need to be able to make a calculation on the data, then put it back into a pivot table to spread it again by period. I only need help getting the data from timespread to data table. See example below. The columns 1 and 2 need to be repeated for every period. The periods, will be changing every time i run the report.
Thank you for your help.
From this | |||||||||
Project | Resource | Field | 01-Dec | 01-Jan | 01-Feb | 01-Mar | 01-Apr | 01-May | 01-Jun |
Job A | Resource 1 | Hours | 20 | 20 | 20 | 20 | 20 | 20 | 20 |
Job A | Resource 2 | Hours | 30 | 30 | 30 | 30 | |||
Job B | Resource 3 | Hours | 20 | 20 | 20 | 20 | 20 | ||
Job C | Resource 4 | Hours | 50 | 50 | 50 | 50 | 50 | ||
Job C | Resource 5 | Hours | 10 | 10 | 10 | 10 | 10 | ||
Job B | Resource 6 | Hours | 30 | 30 | 30 | 30 | 30 | 30 |
<colgroup><col><col><col><col><col><col span="4"><col></colgroup><tbody>
</tbody>
Into this | |||
Project | Resource | Period | Hours |
Job A | Resource 1 | 01-Dec | 20 |
Job A | Resource 1 | 01-Jan | 20 |
Job A | Resource 1 | 01-Feb | 20 |
Job A | Resource 1 | 01-Mar | 20 |
Job A | Resource 1 | 01-Apr | 20 |
Job A | Resource 1 | 01-May | 20 |
Job A | Resource 1 | 01-Jun | 20 |
Job A | Resource 2 | 01-Dec | |
Job A | Resource 2 | 01-Jan | 30 |
Job A | Resource 2 | 01-Feb | 30 |
Job A | Resource 2 | 01-Mar | 30 |
Job A | Resource 2 | 01-Apr | 30 |
Job A | Resource 2 | 01-May | |
Job A | Resource 2 | 01-Jun | |
Job B | Resource 3 | 01-Dec | |
Job B | Resource 3 | 01-Jan | |
Job B | Resource 3 | 01-Feb | 20 |
Job B | Resource 3 | 01-Mar | 20 |
Job B | Resource 3 | 01-Apr | 20 |
Job B | Resource 3 | 01-May | 20 |
Job B | Resource 3 | 01-Jun | 20 |
Job C | Resource 4 | 01-Dec | |
Job C | Resource 4 | 01-Jan | 50 |
Job C | Resource 4 | 01-Feb | 50 |
Job C | Resource 4 | 01-Mar | 50 |
Job C | Resource 4 | 01-Apr | 50 |
Job C | Resource 4 | 01-May | 50 |
Job C | Resource 4 | 01-Jun | |
Job C | Resource 5 | 01-Dec | 10 |
Job C | Resource 5 | 01-Jan | 10 |
Job C | Resource 5 | 01-Feb | 10 |
Job C | Resource 5 | 01-Mar | 10 |
Job C | Resource 5 | 01-Apr | 10 |
Job C | Resource 5 | 01-May | |
Job C | Resource 5 | 01-Jun | |
Job B | Resource 6 | 01-Dec | |
Job B | Resource 6 | 01-Jan | 30 |
Job B | Resource 6 | 01-Feb | 30 |
Job B | Resource 6 | 01-Mar | 30 |
Job B | Resource 6 | 01-Apr | 30 |
Job B | Resource 6 | 01-May | 30 |
Job B | Resource 6 | 01-Jun | 30 |
<colgroup><col><col><col><col></colgroup><tbody>
</tbody>