Hi all,
I'm quite new to VBA and have been struggling with this problem for a while now. I receive data in a way that makes it hard to put into a pivot table, and would like to create a macro that would reformat the data to then make it easier to understand. I need to take one row of an excel file and transform it into multiple rows in a different sheet.
Here is the example of how I receive the data:
The data above shows multiple years in a single row, making it hard to break out into a pivot table in any meaningful way. It also shows the number of years remaining, which means that the rest of the Brand Amount value should be allocated to the number of remaining years there are.
Here is how I would like to reformat it in another sheet where it shows the $s that are going to be spent that year:
There are surely problems that I'm not taking into consideration, so maybe this is tougher than it seems. But it feels like a problem that could be solved with relative ease by someone experienced in VBA.
Also, this is my first post- so if I have left out crucial information or am not following community guidelines in any way please let me know and I will correct the post.
Thanks!
Will
I'm quite new to VBA and have been struggling with this problem for a while now. I receive data in a way that makes it hard to put into a pivot table, and would like to create a macro that would reformat the data to then make it easier to understand. I need to take one row of an excel file and transform it into multiple rows in a different sheet.
Here is the example of how I receive the data:
Brand | Title | CreatorName | Brand Amount | Year 1 | Year 1 $ Total | Year 2 | Year 2 $ Total | Years Remaining |
A | Landscape Analysis | Gottard,Gary | $25,000.00 | 2020 | $25,000.00 | 2021 | $0.00 | 0 |
B | Social Listening | Norton,Melissa | $15,000.00 | 2020 | $7,500.00 | 2021 | $7,500.00 | 0 |
C | In-home Testing | Meyers,Tim | $60,000.00 | 2020 | $20,000.00 | 2021 | $20,000.00 | 1 |
D | In-home testing | Miller,Amanda | $40,000.00 | 2020 | $20,000.00 | 2021 | $20,000.00 | 0 |
The data above shows multiple years in a single row, making it hard to break out into a pivot table in any meaningful way. It also shows the number of years remaining, which means that the rest of the Brand Amount value should be allocated to the number of remaining years there are.
Here is how I would like to reformat it in another sheet where it shows the $s that are going to be spent that year:
Brand | Title | CreatorName | Brand Total $ | Current Year $ | Year |
A | Landscape Analysis | Gottard,Gary | $25,000.00 | $25,000.00 | 2020 |
B | Social Listening | Norton,Melissa | $15,000.00 | $7,500.00 | 2020 |
B | Social Listening | Norton,Melissa | $15,000.00 | $7,500.00 | 2021 |
C | In-home Testing | Meyers,Tim | $60,000.00 | $20,000.00 | 2020 |
C | In-home Testing | Meyers,Tim | $60,000.00 | $20,000.00 | 2021 |
C | In-home Testing | Meyers,Tim | $60,000.00 | $20,000.00 | 2022 |
D | In-home testing | Miller,Amanda | $40,000.00 | $20,000.00 | 2020 |
D | In-home testing | Miller,Amanda | $40,000.00 | $20,000.00 | 2021 |
There are surely problems that I'm not taking into consideration, so maybe this is tougher than it seems. But it feels like a problem that could be solved with relative ease by someone experienced in VBA.
Also, this is my first post- so if I have left out crucial information or am not following community guidelines in any way please let me know and I will correct the post.
Thanks!
Will