Pivot Table

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
 
T

Tod

When it comes to Data fields, you're pretty much stuck
with adding them one at a time. (Of course now that I say
that somebody will proove me wrong! <g>)

tod
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top