+ Reply to Thread
Results 1 to 5 of 5

Excel Slowness in 2007 vs 2003

  1. #1
    Registered User
    Join Date
    11-01-2007
    Posts
    8

    Excel Slowness in 2007 vs 2003

    Hello - I recently converted to excel 2k7, and am having some slowness issues executing some vba code. I created the macro in 2k7, however it takes probably a minute to run, as opposed to 2k3, which runs almost instantly!? I've pasted the code below:
    Please Login or Register  to view this content.
    Basically we're taking data from another sheet in the workbook, performing a basic arithmetical calculation, and pasting values into columns in another sheet. *a note, the variable rw is always <200.

    I'll post this in the vba section also.

    Thjanks!
    Last edited by royUK; 02-05-2008 at 11:37 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    bsmith81, please read the Forum Rules & use Code Tags when posting code. I;ve added them.

    Also, do not post the same question in multiple Forums.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,177
    I believe it is due to Excel 2007 having 146k rows and Excell 2003 having 64k rows.
    Looks like you search every row for a value?
    Please Login or Register  to view this content.
    Regards

    Rick
    Win10, Office 365

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    That's a very inefficient way to find the next empty cell in any version of Excel, try

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-01-2007
    Posts
    8

    Not quite

    Good thought, but since the data comes in a block starting in A1, that loop only counts up until the data stops, which is never more than 200 rows - so that loop never cycles more than 201 times.

    IT seems that when I step through the code, the slowness comes when the values are being moved from one sheet to another. Is there a better way to do this?
    Last edited by bsmith81; 02-05-2008 at 11:48 AM.

+ 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