+ Reply to Thread
Results 1 to 9 of 9

small macro running v slow?

  1. #1
    Forum Contributor
    Join Date
    09-06-2011
    Location
    northern ireland
    MS-Off Ver
    Excel 365
    Posts
    180

    small macro running v slow?

    Hi

    Does anyone know what I am doing wrong - macro takes an excessive amt of time to run ?XL_Export.xlsb

    I include the file required to make it run through

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: small macro running v slow?

    Your code doesn't work. There is no Sheet4 in the attached workbook.

  3. #3
    Forum Contributor
    Join Date
    09-06-2011
    Location
    northern ireland
    MS-Off Ver
    Excel 365
    Posts
    180

    Re: small macro running v slow?

    Resale Ordering.xlsmXL_Export.xlsbHi

    Sorry I didn't realise a response had been received. I attach the macro worksheet and export file for macro - its runs through for me. Let me know if you are still having problems. I just don' t understand why its taking so long to run through

    appreciate your help with this.
    Kind regards
    Leanne

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: small macro running v slow?

    Why do you loop through each row here:
    Please Login or Register  to view this content.
    You may simply copy whole range in block:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  5. #5
    Forum Contributor
    Join Date
    09-06-2011
    Location
    northern ireland
    MS-Off Ver
    Excel 365
    Posts
    180

    Re: small macro running v slow?

    Please Login or Register  to view this content.
    I have used this code in two parts - the bit where I don't need "If rcell.Value >= 0 Then" I was able to replace with your code and it appears to run a bit quicker. Is it possible to do the same for the second part - I just don't know how to include the "If rcell.Value >= 0 Then" ?

    Many thanks for your help
    Leanne

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: small macro running v slow?

    There is still only need for one copy:
    Please Login or Register  to view this content.
    Last edited by Izandol; 03-17-2014 at 07:04 AM.

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: small macro running v slow?

    It may also be better to build range and copy at end:
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    09-06-2011
    Location
    northern ireland
    MS-Off Ver
    Excel 365
    Posts
    180

    Re: small macro running v slow?

    Thanks very much for your help - absolutely perfect and has sped the macro up !

  9. #9
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: small macro running v slow?

    You are welcome.

    Please remember to mark thread solved using Thread Tools link at top of page.

+ 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 is running real slow and makes navigating the worksheet really slow after execution.
    By MichWolverines in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2013, 04:29 PM
  2. Macro to hide/unhide cells not running or running slow
    By mbp727 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2013, 04:22 PM
  3. Macro running slow
    By rz6657 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-14-2012, 04:42 PM
  4. Macro running slow
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-14-2010, 01:58 PM
  5. Macro running very slow
    By papaexcel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2009, 02:47 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