Macro to create workbooks and pivot tables

C

Ciara

I have 2 seperate macro's.
Macro1 -creates a pivot table
Macro2- creates a workbook for each practice.

I would like to combine the two, so that after extracting data needed
to create each workbook I use it as the datasource to create the pivot
table.
Macro2 is based on the example on this website which creates a new
workbook for each value. http://www.rondebruin.nl/copy5.htm#workbook

I need seperate workbooks as it is confidential information... and as I
will be doing this weekly, I would like to have a nice easy macro or
procedure to run, instead of having to create 30 pivot tables. Im sure
this will be easy for someone. Many thanks.
 
R

Ron de Bruin

Hi Ciara

You can use the code that create the pivot in my macro

After this line
WBNew.Sheets(1).Columns.AutoFit
You can run your code

You can use the reference WBNew.Sheets(1) in your code to the sheet with the data

Try it and post back if you have problems
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top