Auto Create PivotTable

Ada01

Board Regular
Joined
Sep 15, 2008
Messages
60
http://www.excelforum.com/excel-programming/772302-create-pivot-table-via-vba-any-source.html

Hello

Summary of what I need to do and why:

I have received a very large data set. I have pivoted that data set into a nice summary. Now, i have to send this off to managers who will drill into that data to see the breakdown of those summary lines - of which there can still be 10K+ lines in some cases.

There will be two drill down levels. the first is by the "Origin" of the sale. From there (the newly created table) i want to automatically create a PivotTable with Unit, Origin, Invoice, Sales Order down the rows, and Revenue and materials and Margin in the data section. I want this to be able to happen automatically no mater what the table name or sheet name and always on the most recently created sheet (from the drill-down) and always automatically without any buttons or commands. Since there are seven "Origins" this could happen seven times and I do not want it to get confused b/c the data table is always going to be different. The second level of drill down is just to choose the invoice that looks funny to them and see the lines of that invoice.

Not all mangers are excel savvy nor would they be able to create the second third or fourth pivot tables, so the automatic portion of this is a necessity in this case

thanks
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top