Reports generator and performance design

Jgiordano

New Member
Joined
Nov 22, 2013
Messages
8
Hi everybody !

I'm opening this thread because i need some help to make one of my application work better. I'm not new to VBA but i have no formation on programming and performance design. I'm pretty sure some of you have come across this type of questions and performance problem. Maybe you could give me some hint on the design. So here is the case :

My application import a table in a sheet than contain 400+ cost centers and information about it that i use to build a report. Those reports need to be grouped by cost center director (70) and saved in a distinct workbook (later emailed to them but it's a different process).

Here is how my the report creation process works:
1. Loop in a named range to create the 70 temporary workbooks and store it in a dictionary
2. On the report sheet, there is a single cell to change (the cost center number) and it change the whole report. So i loop by changing this cell based on a named range containing cost center number.
3. For every cost center number, make a copy using the .rows method (because i need to keep different rows height) on the clipboard then
4. Loop through the dictionary/workbooks to find the corresponding workbook, create a new sheet and paste.
5. Some copy/paste for shape or other object not pasted in #4
6. At the end, loop again in dictionary/workbooks and save each of them.

Everything works fine, except that for steps #2, #3, #4 , it takes more than a hour to process...

Note : I tried this with the same performance results : Create a temporary workbook, loop and create 400+ sheets/reports in it, loop through newly created sheet and copy (copy sheet method) the sheet with same director in a new workbook and save. Very long to process again.

Hope one of you have some ideas or something i should read to improve my coding.
Thanks,
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,214,911
Messages
6,122,199
Members
449,072
Latest member
DW Draft

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