
and (ii) embedded charts - this includes the chart as an object within a sheet, which could be the same worksheet as the data.Įxample 1: Create & Customize a PivotChart based on an existing PivotTable report, using the Charts.Add Method.Ĭreate a PivotChart based on an existing PivotTable report, using the Charts.Add Method. Refer Image 1 for the existing PivotTable report on which PivotChart is based. 'Alternate 2: to add new chart sheet after the last worksheet, use below code line: 'Alternate 1: to add new chart sheet before the active sheet, use below code line: 'adds new chart sheet before or after specified sheet:Ī Before:=Worksheets("Sheet14"), Count:=1 'use the Charts.Add Method to add a new chart sheet in the workbook, which is represented as a Chart object Set PvtTbl = Worksheets("Sheet14").PivotTables("PivotTable1") Refer Image 1a for the PivotChart created after running below code. 'set range for the PivotChart, based on the existing PivotTable: Excel pivot chart hide title code#

'specify the source data for the PivotChart, name of chart sheet and the chart type:Ĭustomize PivotChart created above as Image 1a. 'adjust position and size (both in points) of the Chart Area: Refer Image 1b for the customized PivotChart after running below code.
