Pivot Tables

  • Thread starter Thread starter chaudi
  • Start date Start date
C

chaudi

Hi,

Im trying to create a pivot table in VB but when i run the macro,
instead of summnig the data it seems to count the datapoints. Is there
a way to write a piece of code so that it is forced to sum the data?..

Thanks
Dee
 
You can specify the xlSum function:

With ActiveSheet.PivotTables(1).PivotFields("Units")
.Orientation = xlDataField
.Caption = "TotalUnits"
.Function = xlSum
End With
 
Back
Top