Hi, I wonder whether someone could possibly help me please.
I'm using the code below to extract data from a 'Source' sheet to populate a "Yearly Extract Summary" 'destination sheet. With the unique distinct values copied from column I on the 'Source' ("All Data") sheet to column B on the 'Destination' ("Desired Output") sheet. In addition the values from column J on the 'Source' sheet are summed and paste under the relevant month on the 'Destination' sheet.
The code works fine and the correct figures populate the correct columns and rows on the 'Destination' sheet.
As you can see from the code above, the monthly values have to be hard coded to match the column headings and this is fine when using a static 12 month period. But I'm now wanting to use a rolling 12 month period, which, at the moment, necessitates the need for me to change the code each month so I'd like to change the code but unsure where to even begin, having had help guidance to produce the initial script.
I just wondered whether someone may be able to look at this please and offer some guidance on how I may go about achieving this.
Although I appreciate that the whole script would need to be tweaked, and I'd still like maintain the existing functionality in this section of code:
To help I have attached a file which contain 3 sheets.
- The "All Data" 'Source' sheet,
- The "Output" sheet, used for testing, and
- The "Desired Output" sheet which shows the results using the current code
To run the code, please use the button at the top of the "All Data" sheet.
Many thanks and kind regards
Chris
Bookmarks