Hi guys,
I am created the pivot table on excel file. I want to generate the sum of the pivotitem value of those data. I have coded of the following. But shows error.
tell me is it correct or not.
Dim pvtItm As PivotItem
For Each pvtItm In Worksheets("Pivot7").PivotTables("SamplePivot7").P ivotFields("Parent IOU Name").PivotItems
ActiveCell.FormulaR1C1 = _
WorksheetFunction.Sum("=GETPIVOTDATA(""Employee Name"",Pivot7!R1C1,""Project Location"",""Offsite"",""Designation"",""Asst.Syst ems Engineer"",""Parent IOU Name"",& pvtItm.Name)")
Next