Results 1 to 4 of 4

create multiple charts from 1 pivot table, with VBA

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    create multiple charts from 1 pivot table, with VBA

    Hi there ,

    A colleague made a reporting file with pivot tables and pie charts, but they need to do things manually for every client separately.
    in this file there are 4 sheets : sheet1 with the data , and 3 other sheets with 1 pivot table and 5 pie charts each.
    They want me to automate this stuff with VBA , meaning creating the pivot tables ,copying the data from the pivots , adding the charts and link them to the correct data.
    - creating the pivots with VBA , Adding charts to a sheet should not be a problem

    I tried to add multiple pie charts to 1 pivot table , but this is not working.
    Making 5 pivots ( 1 pivot for each chart ) seems to be stupid and the file will take more size ( i think).

    copying data from the pivot is not so easy i presume , because i need to determine how many columns the pivot has in order to copy the correct amount of data , and therefor create the correct number of charts.

    example of pivot and copied data.

    pivot.
    -----------------------------------------------------
    Sum of Orders Column Labels
    Row Labels 12 18 AM P12 P18 Grand Total
    NOK 371 77 28 39 515
    OK 1 5300 619 164 362 6446
    Grand Total 1 5671 696 192 401 6961
    ----------------------------------------------------

    copied data
    ---------------------
    NOK 18
    OK 18 1

    NOK AM 371
    OK AM 5300

    NOK P12 28
    OK P12 164

    NOK P18 39
    OK P18 362

    NOK TOTAL 515
    OK TOTAL 6446
    -------------------

    I could use some help on this issue.
    If someone has experience with this , all help is welcome

    Kind regards
    Mario
    Last edited by MarMo; 01-31-2013 at 03:11 AM. Reason: question not well described

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