ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   pivot table (https://www.excelbanter.com/excel-programming/382339-pivot-table.html)

tjh

pivot table
 
I recorded the macro below, but altered it to try and accept the name
range "bas1" and the new tab/worksheet named "strNewPg". bas1 should be the
source data, and strNewpg should be the page where the pivot table is
created. I would like it to be created in cell a3 of the strNewPg worksheet.

Thank you for your help.

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
SourceData:=bas1).CreatePivotTable TableDestination:= _
worksheet(strNewPg).range("a3"), TableName:="PivotTable39", _
DefaultVersion:=xlPivotTableVersion10


All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com