More information: I am creating a P&L report based on data imported from SQL Server. On each tab, I have a different portion of the data.
In the columns, it's grouped by month from the TaxDate column, with Sum of Total in the values field.
I'm hoping to create a button that will copy the data from each of the pivot tables and paste it into another sheet, while selecting the appropriate columns to show.
The issue is that I want to select the columns from the previous 10 months. I tried using a Macro (my VBA is mediocre at best) to select the correct columns. This will be useful for approximately seven more days, until December starts. I need to have it so that the dates that are selected will be the correct ones, including after the current month.
Is this making sense? I sure hope so, because I don't know if I really am.
I feel like I probably have to declare a variable based on the current month, and then use that to select the appropriate date range, but I'm clueless as to what the appropriate syntax would be (I do SQL, not VBA :P)
Thanks for the help.
In the columns, it's grouped by month from the TaxDate column, with Sum of Total in the values field.
I'm hoping to create a button that will copy the data from each of the pivot tables and paste it into another sheet, while selecting the appropriate columns to show.
The issue is that I want to select the columns from the previous 10 months. I tried using a Macro (my VBA is mediocre at best) to select the correct columns. This will be useful for approximately seven more days, until December starts. I need to have it so that the dates that are selected will be the correct ones, including after the current month.
Is this making sense? I sure hope so, because I don't know if I really am.
I feel like I probably have to declare a variable based on the current month, and then use that to select the appropriate date range, but I'm clueless as to what the appropriate syntax would be (I do SQL, not VBA :P)
Thanks for the help.