![how to make pivot tables in excel 2013 how to make pivot tables in excel 2013](https://www.techonthenet.com/excel/pivottbls/images/create2010_006.png)
(TableDestination:=PSheet.Cells(19, 1), TableName:=”TeamQualityMetrics”) Set PSheet = Worksheets(“Team Quality Metrics”)ĬreatePivotTable(TableDestination:=PSheet.Cells(20, 2), _ Worksheets(“Team Quality Metrics”).DeleteĪctiveSheet.Name = “Team Quality Metrics”
HOW TO MAKE PIVOT TABLES IN EXCEL 2013 CODE
Using this code I created 2 pivot tables in one sheet and trying to connect 1 slicer with both the tables but in Slicer Connection settings I don’t find option to select another table. With ActiveSheet.PivotTables(“SalesPivotTable”).PivotFields(“Local Legal Entity Code”)
![how to make pivot tables in excel 2013 how to make pivot tables in excel 2013](https://www.get-digital-help.com/wp-content/uploads/2011/04/refresh-pivot-table.png)
MissingItemsLimit = xlMissingItemsDefaultĪctiveSheet.PivotTables(“SalesPivotTable”).RepeatAllLabels xlRepeatLabels With ActiveSheet.PivotTables(“SalesPivotTable”).PivotCache With ActiveSheet.PivotTables(“SalesPivotTable”) “PivotTable!R1C1″, TableName:=”SalesPivotTable”, DefaultVersion:=6 PRange, Version:=6).CreatePivotTable TableDestination:= _ Set PRange = DSheet.Cells(1, 1).Resize(LastRow1, LastCol)Ī(SourceType:=xlDatabase, SourceData:= _ I have delete that part of the code and add it like this and it is working for me: With ActiveSheet.PivotTables("SalesPivotTable").PivotFields ("Amount")ĪctiveSheet.PivotTables("SalesPivotTable").ShowTableStyleRowStripes = TrueĪctiveSheet.PivotTables("SalesPivotTable").TableStyle2 = "PivotStyleMedium9" With ActiveSheet.PivotTables("SalesPivotTable").PivotFields("Zone") With ActiveSheet.PivotTables("SalesPivotTable").PivotFields("Month") With ActiveSheet.PivotTables("SalesPivotTable").PivotFields("Year") (TableDestination:=PSheet.Cells(1, 1), TableName:="SalesPivotTable") _ĬreatePivotTable(TableDestination:=PSheet.Cells(2, 2), _ (SourceType:=xlDatabase, SourceData:=PRange). Set PRange = DSheet.Cells(1, 1).Resize(LastRow, LastCol) LastCol = DSheet.Cells(1, Columns.Count).End(xlToLeft).Column
![how to make pivot tables in excel 2013 how to make pivot tables in excel 2013](https://computer06.com/img/programs/748/how-make-pivot-table-excel-2010-3.jpg)
LastRow = DSheet.Cells(Rows.Count, 1).End(xlUp).Row