N
Nick
I am having a problem when I create a pivot table using a
PivotCache in my VBA code. Sometimes when I add a data
field it summrrizes with a COUNT and sometimes with a
SUM. Is there a line of code that I can put when creating
the Pivot Table to ensure that it does a SUM each time?
Thank you in advance for any help you can offer
Here is an example of what my code currently looks like:
With PivotCache
.PivotFields("PRODMONTH").Orientation = xlRowField
.PivotFields("RECVOL").Orientation = xlDataField
.PivotFields("Data").Orientation = xlColumnField
PivotCache in my VBA code. Sometimes when I add a data
field it summrrizes with a COUNT and sometimes with a
SUM. Is there a line of code that I can put when creating
the Pivot Table to ensure that it does a SUM each time?
Thank you in advance for any help you can offer
Here is an example of what my code currently looks like:
With PivotCache
.PivotFields("PRODMONTH").Orientation = xlRowField
.PivotFields("RECVOL").Orientation = xlDataField
.PivotFields("Data").Orientation = xlColumnField