I'm currently using the Excel 2010 version.
I'm building a pivot table and am trying to figure out which .Calculation options I should be using based on the example below.
For example:
' Set up the data fields
With PT.PivotFields("Good")
.Orientation = xlDataField
.Function = xlSum
.Position = 1
'.NumberFormat = "#,##0"
.Name = "Sum_Good"
End With
With PT.PivotFields("Good")
.Orientation = xlDataField
.Function = xlCount
.Position = 2
'.NumberFormat = "#,##0"
.Name = "Count_Good"
End With
I would like to calculate the percentage of this two fields which is the sum_Good field divide by the count_Good field. Which .Calculation options should I use? Could someone provide me an example?
I'm building a pivot table and am trying to figure out which .Calculation options I should be using based on the example below.
For example:
' Set up the data fields
With PT.PivotFields("Good")
.Orientation = xlDataField
.Function = xlSum
.Position = 1
'.NumberFormat = "#,##0"
.Name = "Sum_Good"
End With
With PT.PivotFields("Good")
.Orientation = xlDataField
.Function = xlCount
.Position = 2
'.NumberFormat = "#,##0"
.Name = "Count_Good"
End With
I would like to calculate the percentage of this two fields which is the sum_Good field divide by the count_Good field. Which .Calculation options should I use? Could someone provide me an example?