Results 1 to 2 of 2
  1. #1
    snax500
    Guest

    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
    Next

    How can I do this?

    Thanks

  2. #2
    snax500
    Guest

    Re: Changing function in Pivot

    I got it. Thanks anyway.

    For i = 1 To pvt.DataFields.Count
    With pvt.DataFields(i)
    .Function = xlSum
    .NumberFormat = "_(* #,##0_);_(* (#,##0);_(* - ??_);_(@_)"
    End With
    Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •