Hi folks,
I am creating a pivot table, i used the macro recorder to do this. But when there is more or less data, I either get blanks or some data doesn't get selected. Is there a way to tell the SourceData to get only the visible data through the 13 columns?
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Data!R1C1:R790C13", Version:=6).CreatePivotTable TableDestination:= _
"Sheet2!R3C1", TableName:="PivotTable1", DefaultVersion:=6
I ran the same report this morning and I have 788 rows, so my pivot table would create some blanks.
Thank you!
I am creating a pivot table, i used the macro recorder to do this. But when there is more or less data, I either get blanks or some data doesn't get selected. Is there a way to tell the SourceData to get only the visible data through the 13 columns?
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Data!R1C1:R790C13", Version:=6).CreatePivotTable TableDestination:= _
"Sheet2!R3C1", TableName:="PivotTable1", DefaultVersion:=6
I ran the same report this morning and I have 788 rows, so my pivot table would create some blanks.
Thank you!