U
Uddinj1
Hi All,
Is there a way to add multiple data fields to a pivot table with a single
statement. The following would add Row Field, Column Field and Page field:
Mypivot.Addfields Array(Months, Regions, Country)
At this moment I am using the follwing to add datafields:
With Mypivot.Pivotfields("Cost of Production")
.Orientation = xlDatafield
.Caption = "Cost"
.Function = xlSum
End with
I have quite a few of them. I need to put the Function statement in as some of
them are treated as Count instead of sum by the automatic pivot table
generation. I need to put all of them as sum.
How can I add all of them at once?
Thanks for your help.
Regards
UJ
Is there a way to add multiple data fields to a pivot table with a single
statement. The following would add Row Field, Column Field and Page field:
Mypivot.Addfields Array(Months, Regions, Country)
At this moment I am using the follwing to add datafields:
With Mypivot.Pivotfields("Cost of Production")
.Orientation = xlDatafield
.Caption = "Cost"
.Function = xlSum
End with
I have quite a few of them. I need to put the Function statement in as some of
them are treated as Count instead of sum by the automatic pivot table
generation. I need to put all of them as sum.
How can I add all of them at once?
Thanks for your help.
Regards
UJ