Hello!
In the Excel Pivot Table I am able to set the DATE to lastmonth with, what if I want xlDateLastMonth - 1 (which means one month before xlDateLastMonth)?![]()
xlDateLastMonth
Here is the code which is already working fine. I tried to use xlDateLastMonth - 1 but no success:
![]()
pt.PivotFields("DATE").ClearAllFilters pt.PivotFields("DATE").PivotFilters.Add2 _ Type:=xlDateLastMonth
The DATE on the pivot table is in this format: 5/1/2020 (m/d/yyyy). So, if I want one month before it should be 4/1/2020 (April)
Thanks!!
Bookmarks