I typed up some code I was hoping would solve my pain but it doesn't work.
I have pivot tables that use data from a table but sometimes people leave blanks in the date field and when the book gets refreshed every pivot table in the book throws up errors about overlapping because of the blank space in the date. The grouping gets undone and I suddenly have data as far back as 2016 appearing in the tables. Each time i have to manually go in and change the grouping to each table and reset everything, thats after I look up online how to do the grouping to begin with because I'll forget and for a month we will be good and then suddenly someone overlooks a date input.
Sub SetMonth() Dim PT As PivotTable Dim WS As Worksheet Dim PF As PivotField Set PF = PT.PivotFields("Date") For Each WS In ThisWorkbook.Worksheets For Each PT In WS.PivotTables PF.LabelRange.Group Start:=7306, End:=73051, Periods:=Array(False, False, False,False, True, False, True) PT.RefreshTable Next PT Next WS End Sub