PivotField.Function (Excel)
Returns or sets the function used to summarize the PivotTable field (data fields only). Here you can find possible values for
For OLAP data sources, this property is read-only and always returns xlUnknown. For other data sources, this property cannot be set to xlUnknown.
ActiveCell.PivotField.Function = xlAverage