Hello,
This forum has been invaluable in assisting in me with a variety of Excel issues but I have a new situation for which I cannot find a solution.
I have a pivot table that pulls from a massive data source that contains financials based on a rolling 12 month average. I need to be able to filter one month at a time in the pivot to produce the report.
I am in search of a macro that will refresh the pivot and default to selecting the most recent month that appears in the pivot table filter list.
Currently, the pivot table contains a 'Date' in the filter field and because the data on each line for the date is a rolling 12 months of data, I need only select one month at a time to see the values for the past 12 months. What I need is to create a macro that will only place a checkmark in the most recent date that is returned when the pivot table is refreshed.
I have an example spreadsheet if anyone needs it (not sure how to attach it here).
Is this possible?
Any help is greatly appreciated!
Thanks,
Cameron
[Edited to add: I have tried creating a combo box referring to a dropdown list of months and pointing the output cell to a named range called selMonth and naming the cell in the pivot filter to fltMonth and applied the below macro
Sub updatePivot()
[fltMonth] = [selMonth]
End Sub
but it is not working...i'm not sure if it is having trouble because i am using a custom format for the date of YYYY-MM and not using the excel five digit date number or what]
This forum has been invaluable in assisting in me with a variety of Excel issues but I have a new situation for which I cannot find a solution.
I have a pivot table that pulls from a massive data source that contains financials based on a rolling 12 month average. I need to be able to filter one month at a time in the pivot to produce the report.
I am in search of a macro that will refresh the pivot and default to selecting the most recent month that appears in the pivot table filter list.
Currently, the pivot table contains a 'Date' in the filter field and because the data on each line for the date is a rolling 12 months of data, I need only select one month at a time to see the values for the past 12 months. What I need is to create a macro that will only place a checkmark in the most recent date that is returned when the pivot table is refreshed.
I have an example spreadsheet if anyone needs it (not sure how to attach it here).
Is this possible?
Any help is greatly appreciated!
Thanks,
Cameron
[Edited to add: I have tried creating a combo box referring to a dropdown list of months and pointing the output cell to a named range called selMonth and naming the cell in the pivot filter to fltMonth and applied the below macro
Sub updatePivot()
[fltMonth] = [selMonth]
End Sub
but it is not working...i'm not sure if it is having trouble because i am using a custom format for the date of YYYY-MM and not using the excel five digit date number or what]