I have been working on a Sheet for use at work, that will eventually be spread to multiple offices
Every office will have its own set of data to use.
basically, it sorts it to a Pivot table
Macro I made to automate the time consuming task, in general works great, but needs to have the Data Source refreshed every time...
What happens is it seems to not know to refresh the entire data set... I dont know how to describe it other than if I only have 1400 lines in the data set after initial sorting and removing of extra data by using my macro, the next time the data is refreshed, it only looks at that same 1400 lines
and I need it to change the Pivot data set to look at about 5000 lines every time I run the macro
Right now when I create a Macro and Just do it manually to see what it does, I get this
Range("A2").Select
ActiveSheet.PivotTables("PivotTable1").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"https://filelocation.com/personal/online_com/Documents/[Report In-Out.xlsm]QC Outbound!R1C1:R5000C13" _
, Version:=6)
Sheets("QC Outbound").Select
but becasue this will be shared by many offices, and each office uses their own online location, I need it to be generic and not include a web link..
Is there an "Active sheet" type of command I can put in to update the Pivot data source instead of the full file location?
Bookmarks