ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selecting Date Range in a Pivot using VBA (https://www.excelbanter.com/excel-programming/446425-selecting-date-range-pivot-using-vba.html)

Gaura215

Selecting Date Range in a Pivot using VBA
 
I have created a pivot table, which has a date field in report filter field.

I need to prepare this Pivot every month. Is it possible, that while preparing this PIVOT using VBA, something can be done that the pivot automatically selects the dates only from the previous month and do not show all dates in the pivot.

For example, this month I prepared the report for the month of may. So I want the pivot to automatically show the data from may month and not the all months data. I have copied below the table below which I prepared.


Date Logged (All)
Status (All)
Country (Multiple Items)

Count of Tick mark when_x0020 Column Labels
Row Labels 0 1 Grand Total
High 89 8 97
Low 93 2 95
Medium 98 4 102
Grand Total 280 14 294


All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com