Consulting

Results 1 to 3 of 3

Thread: Pivot Table Calculated Field

  1. #1

    Talking Pivot Table Calculated Field

    How can I add calculated field in a pivot table at run time? Is it possible to use the sub-total field in the calculated field formula?

  2. #2
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    You would use something like:
    [VBA]
    Worksheets(1).PivotTables(1).CalculatedFields.Add "PxS", _ "= Product * Sales"[/VBA]

    Calculated fields work at an aggregate level.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3

Posting Permissions

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