Consulting

Results 1 to 6 of 6

Thread: Pivot Table events

  1. #1
    VBAX Regular
    Joined
    Jun 2005
    Location
    Sydney
    Posts
    60
    Location

    Pivot Table events

    I have some code that I want to run after changing a PivotFields().currentpage but I can't find an event to trigger it. Is it possible to create a Class Module for PivotTable events? Are there any other suggestions?

    What I want to do is to display a calculation of the second last column of the pivot, divided by the last column of the pivot.

    I am using Excel 2000.

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Have you tried creating this as a calculated field?

  3. #3
    VBAX Regular
    Joined
    Jun 2005
    Location
    Sydney
    Posts
    60
    Location
    Do you mean within the Pivot Table? If so, I need to know more than I do now about Pivot Tables. I want to divide the last column (only) by the Total. Can I do that in a calculated field?

  4. #4
    VBAX Regular
    Joined
    Jun 2005
    Location
    Sydney
    Posts
    60
    Location
    I checked out Calculated fields and I don't think it will work, because I want to divide the total of a particular column (which is always the last column) by the grand total. From what I can see, Calculated fields doesn't do this.

  5. #5
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Can you post a sample workbook?

  6. #6
    VBAX Master XLGibbs's Avatar
    Joined
    Jan 2006
    Location
    state of confusion, but vacation in denial
    Posts
    1,315
    Location
    Yes, you can show this without doing anything fancy.

    Drag the column you want as the numerator into the pivot table data area.

    Click the field settings options and choose advanced.

    Choose to show the field as a % Of ___
    and pick the option that suits your needs best (row,column or "previous" might work in your example)
    If you have posted the same question at multiple forums, please read this IMPORTANT INFO.

    Please use the thread tools to mark your thread Solved


    Please review the Knowledge Base
    for samples and solutions , or to submit your own!




Posting Permissions

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