Pivot Table Sum does not work
Posted by Mr Confused on November 06, 2001 1:34 AM
I am trying to build an automated pivot table which sums values. I recorded the creation of the pivot table which worked fine and summed the values as required. However, when I run the macro the values are not summed but counted (which is useless for me). What is going on? Has anyone else had this problem?
I've tried formatting the values to ensure they are numbers and don't default to strings - but still no joy.
I don't understand why it should work properly when I try this using the longhand method, but fails to work when I macro-ize it.
Am I missing some property of the pivot table?
Thanks in advance,
'build the pivot
ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:= _
"Arrays!R1C1:R1" & RowCount & "C2", TableDestination:="", TableName:="PivotTable2"
ActiveSheet.PivotTables("PivotTable2").AddFields RowFields:="Name", _
ActiveSheet.PivotTables("PivotTable2").PivotFields("FTE").Orientation = _