+ Reply to Thread
Results 1 to 12 of 12

Code advances VERY SLOWLY and blocks after 3 columns of calculations

  1. #1
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Code advances VERY SLOWLY and blocks after 3 columns of calculations

    Hi,

    I have constructed a code for the GARCH financial model basing myself on a template that in fact, first, for 1st column, is VERY slow! Takes some 6-7 minutes to run... (how could I make it more efficient)?

    And, for the third column Rentabilites it goes way down and gives me back an error.. while I want it to stop at the last data...

    Does anyone have a clue how to fix this?

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by seigna; 05-07-2013 at 02:07 PM. Reason: CODE FOR MODULE 2

  2. #2
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    The code for module 2 is up there.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    Please Login or Register  to view this content.
    Get rid of "Selection"
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Use lastrow instead of fixed loop as your code may not need to go all the way down to 1266, if You have not got data.

  4. #4
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    Do you mean I should use End(xlUp)?

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    Yes, that is right

  6. #6
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    In those lines where I deleted select?

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    Generally when you loop through, avoid using a fixed looping range, use lastrow, so the code will not go to the last fixed loop if there are not data.

  8. #8
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    I can't see how exactly to do it.. :S

  9. #9
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    How could I rewrite this?

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    And , the first values aren't placed in the column either...

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    I do not know as you have many selection, but to give some idea

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    04-07-2013
    Location
    France
    MS-Off Ver
    Excel 2011
    Posts
    166

    Re: Code advances VERY SLOWLY and blocks after 3 columns of calculations

    And how would I integrate the formula in here?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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