+ Reply to Thread
Results 1 to 15 of 15

Need improve speed of transpose & delete row shiftUp (11 minutes)

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Need improve speed of transpose & delete row shiftUp (11 minutes)

    Hello All,
    I had someone help me with the code below from this forum. The code works fine but now if I run 500 rows, its much slower (11 minutes). I appreciate it if I could get some help on my code to make it faster or if there are any alternative methods that could improve the speed.

    Regards,
    tt3

    Please Login or Register  to view this content.
    Last edited by tuongtu3; 04-18-2013 at 10:06 PM. Reason: Solved

  2. #2
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    I don't see this in your code, so I'm asking: did you try Application.ScreenUpdating property?
    According to MS Excel VBA Help:
    Turn screen updating off to speed up your macro code. You won't be able to see what the macro is doing, but it will run faster.
    I can not guarantee it will speed up your macro, but give it a try.

  3. #3
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Hi Sbarro79,
    Thank you for your response.
    Yes, the code run 11 minutes including "Application.ScreenUpdating = False & Application.ScreenUpdating = True"

    Regards,
    tt3

  4. #4
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Try step into macro and run through with F8 to see if there is a major hold up somewhere

  5. #5
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Hi Phil,
    There's no major hold up somewhere in the code. I think the code takes a certain amount of time to create one row and then multiply it by 500 to get the total time.

    Regards,
    tt3

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Please help. Any alternative methods are fine.

    Regards,
    tt3

  7. #7
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    I just ran the macro with 500 rows in column B and it took less than a minute to run. Maybe it is an issue with your computer?

  8. #8
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Hi Phil,
    Thank you for your time. I have a sample in the attached and please test again.

    Regards,
    tt3
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Ok.
    That one took about 2 minutes to run

  10. #10
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Turning calculation off took it to less than a minute on my laptop.

    Please Login or Register  to view this content.
    Last edited by WasWodge; 04-14-2013 at 02:21 PM. Reason: Re-indented
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  11. #11
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Hi Phil & Waswodge,
    Thank you for your time and help. The issue is from the code ''''''''Delete Row Value = 0''''''''. I'm looking for alternative method such as filter to see if it can run better.

    Regards,
    tt3

    Code below is for reference only and looking for a better code:
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    08-04-2004
    Location
    Amsterdam
    MS-Off Ver
    2016
    Posts
    186

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    What isn't it doing that you want it to do?

  13. #13
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Hi Phil,
    I did re-test a sample & real workbook at work today and it took less than a minute on some desk/lap top. The speeding issue happened when the user open two or three wb even they just run one wb at a time but some how it took forever like 5-11 minutes. Another speeding issue is from my boss Macbook pro, runs on 7-11 minutes (OS win7, quad cores I7, 2.2GHz 8G RAM, 512 SS HD). I'm looking for alternative method of delete row shiftUp to see if it can help improve speed on Macbook Pro.

    Regards,
    tt3

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    1) Do not recommend to use "Transpose" as a procedure name.

    Try this one
    Please Login or Register  to view this content.
    Last edited by jindon; 04-16-2013 at 03:52 AM.

  15. #15
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    810

    Re: Need improve speed of transpose & delete row shiftUp (11 minutes)

    Hi Jindon,
    I did test with your code and it works more than I expected. I test three time and it took 2 minutes on Macbook Pro and 3 seconds on two desktops.

    Thank you very much for your time and help (Jindon, WasWodge, Phil, SBarro).

    Regards,
    tt3

+ 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