+ Reply to Thread
Results 1 to 3 of 3

Why so slow and can it be improved?

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    95

    Why so slow and can it be improved?

    Hi,

    im in the middle of creating an IO schedule to crunhc through 1k or so lines of IO. as i add to the functionality it increases to become slower and slower as it calcs. it currenlty now calculates what looks like a in a loop 3 times. i appreciate it may not be the most efficiently produced workbook but can anyone help me to improve this or pint out where im going massively wrong?

    Thanks
    Attached Files Attached Files
    Check out my photography site, Lens Art http://www.lensart.me.uk

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Why so slow and can it be improved?

    Took me all day to be able to post this on the forum. Yeesh.

    You can optimize your code like the below. In VBA you usually don't need to select an item to work with it, or even have it visible.

    Please Login or Register  to view this content.
    To make your file size smaller, you can make all your pivot tables have the same Data Source. Pivot Tables, by default, store their data in the background. It is not just a reference. Pivot Tables are smart(ish), though and when two or more Pivot Tables share the same data source, it will only store the data once. If the sources are at all different, however, you are duplicating data. So, as a best practice, when possible, just grab the whole table for all your pivot tables and then only display the columns you need.

    I don't know what else can be done to speed up the workbook.

  3. #3
    Registered User
    Join Date
    10-12-2009
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    95
    Thanks very much for doing that, I've not tried this yet but everything you said makes absolute sense... Thanks again


    Quote Originally Posted by Whizbang View Post
    Took me all day to be able to post this on the forum. Yeesh.

    You can optimize your code like the below. In VBA you usually don't need to select an item to work with it, or even have it visible.

    Please Login or Register  to view this content.
    To make your file size smaller, you can make all your pivot tables have the same Data Source. Pivot Tables, by default, store their data in the background. It is not just a reference. Pivot Tables are smart(ish), though and when two or more Pivot Tables share the same data source, it will only store the data once. If the sources are at all different, however, you are duplicating data. So, as a best practice, when possible, just grab the whole table for all your pivot tables and then only display the columns you need.

    I don't know what else can be done to speed up the workbook.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can this be improved?
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2014, 05:03 PM
  2. [SOLVED] Slow Code, Can it be improved on?
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2014, 09:53 AM
  3. Can the following Vba's be improved to run quicker.
    By Toonies in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2012, 06:54 AM
  4. Replies: 1
    Last Post: 04-09-2012, 11:22 AM
  5. Any suggestions on how this can be improved
    By jsmity in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-31-2007, 05:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1