+ Reply to Thread
Results 1 to 2 of 2

VBA - Chart Help getting correct series from Pivot table

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    Manitoba, Canada
    MS-Off Ver
    2010
    Posts
    28

    VBA - Chart Help getting correct series from Pivot table

    Hi All,

    I'm trying to build a 1 pie chart from a pivot table named "cancelled".
    I've renamed the "grand totals" to "missions"

    I've created my chart but the series is incorrect and I'm not sure how to fix. I want the series to be the PivotItems(FTD,INC,IND...WX)
    and the data to be the column totals (1,7,15,1,....105)


    PivotTable("Cancelled").PivotFields("Mission Status code").PivotItems
    Sample Pivot Table:

    Cancellations
    FTD INC IND ING OTH PMW STG STU WDL WSL WX Missions
    Ph I Pri - 1301 6 4 2 4 1 19 36
    Ph I Pri - 1301A 1 2 6 1 17 4 32 63
    Ph I Pri - 1302 4 3 1 2 14 4 40 68
    Ph I Pri - 1302A 1 1 1 11 14
    Ph I Pri - 1210 3 3
    Missions 1 7 15 1 7 2 36 8 1 1 105 184


    Please Login or Register  to view this content.

    I've tried to find more information on how to select data from pivot tables using VBA but I'm not finding alot.
    I did find some helpful info on Peltier Tech blog.

    Thanks for your help

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: VBA - Chart Help getting correct series from Pivot table

    Have you tried using the macro recorder? Turn it on, do what you want, then check the code for the right syntax

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1