Hi
I've recorded a Macro for generating a PivotTable.
By recording the macro Excel took "WERE!R1C1:R20466C14", however I need it to select the actual datarange which can be bigger but also smaller.
How do I adjust it the code so it will select the actual Data Row/Column size?
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"WERE!R1C1:R20466C14", Version:=xlPivotTableVersion10).CreatePivotTable _
TableDestination:="Tabelle2!R3C1", TableName:="PivotTable2", _
DefaultVersion:=xlPivotTableVersion10
Thanks!
Bookmarks