+ Reply to Thread
Results 1 to 10 of 10

Macro speed Excel 2010 vs Excel 2013

  1. #1
    Registered User
    Join Date
    10-17-2013
    Location
    Ardooie
    MS-Off Ver
    Excel 2007
    Posts
    67

    Macro speed Excel 2010 vs Excel 2013

    Hi guys, quick question about speed of a workbook that has VBA code in it.
    The workbook worked fine in Excel 2010, but now that I got an upgrade at work to Office 2013,
    the book takes forever when changing values.

    Any hints to make this code work faster? Or is it a 2010 vs 2013 thing?


    Please Login or Register  to view this content.
    Thx for any advice, will be appreciated !!
    Kind regards
    Kristof

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro speed Excel 2010 vs Excel 2013

    Hello louvaek,

    Try these macros and let me know how they perform.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-17-2013
    Location
    Ardooie
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro speed Excel 2010 vs Excel 2013

    Hey Leith,

    Thanks for taking some time to look at the code and offering a solution.

    My code does 4 things:
    1/ highlight cells that have comments
    2/ change all lowcase values in uppercase
    3/ Sort ranges C:I depending on input in collumn C
    4/ Unhide a new row if value is added in collumn C, or hide a row when a value is deleted

    After replacing the original code with yours, unfortunately all macro's have stopped working (no error, just not doing anything)
    On the bright side, the sheet works very very fast now hahahaha

    To explain number 3 and 4, let me try to give an example:

    C D E F G H I
    9 Jurgen Jurgen Jurgen Jurgen Jurgen Jurgen
    10 Stefano Stefano Stefano Stefano Stefano Stefano
    11 Ron Ron Ron Ron Ron Ron

    Row 12 is an empty line, where user can make new input in collumn C.
    The moment the input is done, C9:C12 is sorted (A to Z) en and a new line is unhiden (row 13).
    (btw collumn D is just empty)

    Hope this helps a bit

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro speed Excel 2010 vs Excel 2013

    Hello louvaek,

    Sorry about the results. I had hoped it would have worked. Without a workbook, I cannot test the macros accurately.

    The macros are shortened versions of the originals you posted. The reason they were slow was due to an extreme amount of redundancy and improper error handling. There was really no reason you should have had errors in this code.

    If you can post a copy of the workbook, that would be fastest way for me to test and troubleshoot the macros. Before posting a copy of the workbook, please remember to redact any sensitive or confidential information.

  5. #5
    Registered User
    Join Date
    10-17-2013
    Location
    Ardooie
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro speed Excel 2010 vs Excel 2013

    One sheet attached (B2019.xlsm)

    This is with the original code that is now so slow in Excel 2013.

    Thanks man, appreciate it !!
    Attached Files Attached Files

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro speed Excel 2010 vs Excel 2013

    Try this (abomination?)

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Macro speed Excel 2010 vs Excel 2013

    Hello louvaek,

    I downloaded the workbook you posted. However, something is amiss with the internal structure. The workbook fails to run correctly even with your original macros and froze my system twice.

    Due to the aberrant behavior of the workbook, I am unable to help you further.

  8. #8
    Registered User
    Join Date
    10-17-2013
    Location
    Ardooie
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro speed Excel 2010 vs Excel 2013

    Xladept thanks man, works like a charm !!

  9. #9
    Registered User
    Join Date
    10-17-2013
    Location
    Ardooie
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Macro speed Excel 2010 vs Excel 2013

    Leith, thanks anyway, glad you've tried and appreciate it !

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro speed Excel 2010 vs Excel 2013

    You're welcome and thanks for the rep!

    *Very interesting - the code is, virtually, the same only without so many If.......End If parts

+ 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. Macro works under Excel 2010 but not Excel 2013
    By Carrfamily in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2017, 07:08 AM
  2. Pdf Converting Macro Excel 2010 Working 2013 Not
    By ofd2008 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2017, 02:15 AM
  3. Macro that works in Excel 2010 does not work in Excel 2013
    By karenmwhaley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2016, 08:12 PM
  4. [SOLVED] Macro to move a row works in excel 2010 but not in Excel 2013
    By mmccra2858 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 05:07 PM
  5. VBA formatting macro that worked in Excel 2010 is not working correctly in Excel 2013
    By jayar2112 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2015, 01:14 PM
  6. Macro code working fine in excel 2013 but not in excel 2010.
    By sere in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2014, 02:23 AM
  7. Replies: 4
    Last Post: 04-10-2014, 12:11 PM

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