Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can I create pivot table from two other pivot tables? pjk@boro Excel Discussion (Misc queries) 5 June 13th 09 12:13 PM
Unexpected SaveAs prompt for workbooks with pivot tables KentL Excel Programming 0 October 7th 05 10:38 PM
Problem with a recorded macro to create two pivot tables from same data rjamison Excel Programming 0 June 14th 05 12:14 AM
Problem with a recorded macro to create two pivot tables from same data Pete Straman via OfficeKB.com[_2_] Excel Programming 1 April 20th 05 05:28 PM
Shared workbooks, advanced filters, and refreshing pivot tables Lara[_2_] Excel Programming 0 April 15th 04 11:59 PM


All times are GMT +1. The time now is 05:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"