+ Reply to Thread
Results 1 to 8 of 8

Run the code faster.

  1. #1
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Run the code faster.

    Hello friends, hope all is well!
    can you please help me make the below code run faster?

    Thank you very much in advance!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Run the code faster.

    Hi countryfan_nt

    What are you trying to achieve here?

    When do you expect this loop to terminate?:
    Please Login or Register  to view this content.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Re: Run the code faster.

    B34 = the code above runs in cell B34, hence, values start from 0 and stops when C34 becomes TRUE.
    C34 formula: =IF(E34<=B34,TRUE,B34).
    E34 has the target value, to finally show the desired result.

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Run the code faster.

    Remove this line:
    Please Login or Register  to view this content.
    and move this line:
    Please Login or Register  to view this content.
    above this line:
    Please Login or Register  to view this content.
    Last edited by kev_; 10-29-2017 at 02:24 AM.

  5. #5
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Re: Run the code faster.

    done, but still not fast enough. you see this is feeds a chart, and I wish to see the chart results run faster.
    Attached Files Attached Files
    Last edited by countryfan_nt; 10-29-2017 at 02:32 AM.

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Run the code faster.

    To speed up processing
    - use a variable to calculate
    - write the result to the cell when condition satisfied

    Try this:
    Please Login or Register  to view this content.

    EDIT - please note that I amended the code in a couple of places after posting
    Last edited by kev_; 10-29-2017 at 03:49 AM. Reason: Tidied up code

  7. #7
    Forum Contributor
    Join Date
    06-24-2004
    MS-Off Ver
    Excel 2013 Pro Plus
    Posts
    122

    Re: Run the code faster.

    Thank you very much!

  8. #8
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Run the code faster.

    You are welcome. Thanks for reps and marking thread SOLVED

+ 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. [SOLVED] Trying to get this code to run FASTER
    By g1terra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2017, 02:23 PM
  2. vba code to run faster
    By ikhan99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2016, 02:19 AM
  3. [SOLVED] Get a code to run faster
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2015, 02:07 AM
  4. Making a VBA code faster
    By Human2014 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2014, 01:20 PM
  5. Can code run faster
    By leem in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2010, 02:52 PM
  6. I need faster code
    By mpeplow in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-16-2007, 05:30 PM
  7. Faster way to code this
    By jhahes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2006, 12:08 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