ssuresh1988
Feb 26, 2013, 04:37 AM
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").PivotFields("Parent IOU Name").PivotItems
ActiveCell.FormulaR1C1 = _
WorksheetFunction.Sum("=GETPIVOTDATA(""Employee Name"",Pivot7!R1C1,""Project Location"",""Offsite"",""Designation"",""Asst.Systems Engineer"",""Parent IOU Name"",& pvtItm.Name)")
Next
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").PivotFields("Parent IOU Name").PivotItems
ActiveCell.FormulaR1C1 = _
WorksheetFunction.Sum("=GETPIVOTDATA(""Employee Name"",Pivot7!R1C1,""Project Location"",""Offsite"",""Designation"",""Asst.Systems Engineer"",""Parent IOU Name"",& pvtItm.Name)")
Next