Hi,
In the below code, range has update as Range("a1:i" & Range("a65356").End(xlUp).Row))
Instead of giving any specific cell as destination, i need to change the code as equal to the last row of column "A".
It will help even the used cells go beyond "a65356"
Regards![]()
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _ Range("a1:i" & Range("a65356").End(xlUp).Row)).CreatePivotTable TableDestination:=Sheets("Pivot").Cells(1, 1), _ TableName:="PivotTable1"
Prabhu
Bookmarks