+ Reply to Thread
Results 1 to 4 of 4

Running time difference Excel 2007/2010

  1. #1
    Registered User
    Join Date
    01-27-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    5

    Running time difference Excel 2007/2010

    Hi All,

    I've got a macro which determines if, in a certain section, a row should be hidden or not. Code is posted below.

    Please Login or Register  to view this content.
    If try to run this code on a section of about 4000 rows (startRow = 523, endRow = 4643). Running this macro on Excel 2007 takes about 5 seconds. However, running this code on Excel 2010 takes about 150 seconds. That's about 30 times as long :S

    Has anyone got any idea where this difference in running time comes from??? The computers running 2010 are newer (faster CPU's and more memory), so it's not a hardware problem...

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Running time difference Excel 2007/2010

    Excel takes longer time to do many repeated instructions.
    Try to use this code where it uses a Range to store rows to hide and then hides all the rows with a single instruction.
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    01-27-2010
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Running time difference Excel 2007/2010

    Antonio,

    Tnx for the reply. I know that this macro isn't optimised speedwise. I will try if your solution is fatser.

    But I was actually more interested in the difference in speed between Excel 2007 and Excel 2010. Although this macro could be faster in general, it is 30 times faster in 2007 than in 2010. And that I can't explain...

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Running time difference Excel 2007/2010

    I think this will make no difference at all.

    Please Login or Register  to view this content.
    From the difference in speed between different codes you might be able to deduce what causes the difference.



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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