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
Bookmarks