Forum Discussion
RichTBennett
Dec 18, 2020Copper Contributor
Creating a Macro to create a pivot table using a dynamic number of rows
Hi all, So I'm now at the very limit of my abilities ... trying to record and then debug macros - Is there anyone out there that can help? What I'm trying to accomplish is this: 1. Export ...
RichTBennett
Dec 18, 2020Copper Contributor
This is the initial error I'm getting highlighted yellow in the VBA editor
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"GridData!R1C1:R443C21", Version:=6).CreatePivotTable TableDestination:= _
"Sheet1!R3C1", TableName:="PivotTable3", DefaultVersion:=6
FabiolaZ
Dec 05, 2023Copper Contributor
Were you ever able to solve it? Im facing the exact same problem and its driving me crazy RichTBennett
- Patrick2788Dec 05, 2023Silver Contributor
Have you considered converting the source data to a table and pivoting off the table? All you'd need to update the pivot would be to right-click it and choose refresh. If you really wanted to take it further, you create a macro that simply refreshes the pivot table at intervals.
Another option could be the forthcoming PIVOTBY function...