Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to create workbooks and pivot tables
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to create workbooks and pivot tables
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 -- Regards Ron de Bruin http://www.rondebruin.nl "Ciara" wrote in message oups.com... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to create workbooks and pivot tables
Sorted! thanks very much. I can't believe how easy that was.
Ron de Bruin wrote: 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 -- Regards Ron de Bruin http://www.rondebruin.nl "Ciara" wrote in message oups.com... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
can I create pivot table from two other pivot tables? | Excel Discussion (Misc queries) | |||
Unexpected SaveAs prompt for workbooks with pivot tables | Excel Programming | |||
Problem with a recorded macro to create two pivot tables from same data | Excel Programming | |||
Problem with a recorded macro to create two pivot tables from same data | Excel Programming | |||
Shared workbooks, advanced filters, and refreshing pivot tables | Excel Programming |