Results 1 to 2 of 2
Thread: Changing function in Pivot
2001-04-23, 18:50 #1snax500Guest
Changing function in Pivot
In Excel2000, I want to have a macro that will change all of my fields selected to a sum function. Now when I select a field they are on Count. I tried something like this but it doesn't work:
For Each PivotFields In PivotTables
PivotFields.Function = xlSum
How can I do this?
2001-04-23, 20:44 #2snax500Guest
Re: Changing function in Pivot
I got it. Thanks anyway.
For i = 1 To pvt.DataFields.Count
.Function = xlSum
.NumberFormat = "_(* #,##0_);_(* (#,##0);_(* - ??_);_(@_)"