+ Reply to Thread
Results 1 to 6 of 6

Macro speed improvement

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    79

    Macro speed improvement

    Hi, I'm looking to improve the speed of a macro by regrouping different actions into one.

    Here's a list of stuff that I think could be potentially done, but I'm not sure how:

    1 - Autofill destination:

    Please Login or Register  to view this content.
    I tried the following:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    None worked.

    2- Offset selection:

    Please Login or Register  to view this content.
    I didn't try anything, I'm not sure how to select the different offset cells into one. Is it possible?


    3- Formulas with find blank in different cells at the same time:


    Please Login or Register  to view this content.

    Again, I didn't try anything and I'm not sure how to select the different find blank cells at the same time. Is it possible?




    Thanks for any help provided.

    Note - Cross-posted here: http://www.mrexcel.com/forum/excel-q...ml#post3475018
    Last edited by YounesB3; 05-19-2013 at 11:12 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro speed improvement

    Perhaps:

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

    Explain in words what you're trying to do in the second scenario, do not refer to vba in your explanation.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-05-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Macro speed improvement

    Quote Originally Posted by JBeaucaire View Post
    Perhaps:

    Please Login or Register  to view this content.
    This seems to work, but still acts kind of like 2 copy-paste, which doesn't improve the macro speed

    Or:
    Please Login or Register  to view this content.
    This copies line 52 as value and also still acts kind of like 2 copy-paste, which doesn't improve the macro speed

    Explain in words what you're trying to do in the second scenario, do not refer to vba in your explanation.
    My macro works in the 3 scenario, I just want to regroup some of the lines to make it faster. Maybe it's not possible though.


    As for the second scenario, what I'd like to do is to select the different offset at the same time. Something like this :

    Please Login or Register  to view this content.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro speed improvement

    Is row2 all formulas? if so:

    Please Login or Register  to view this content.


    Second problem was not described in words, so can't really visualize WHAT you're doing. You may be right, separate ranges frequently must be dealt with separately.

  5. #5
    Registered User
    Join Date
    09-05-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: Macro speed improvement

    Quote Originally Posted by JBeaucaire View Post
    Is row2 all formulas? if so:

    Well cell A52 and BH52:BR52 are all formulas yes.

    Please Login or Register  to view this content.
    This one seems to work like the previous one as well, thanks!

    I'd like to know though if it's possible to do both line 2 and 3 at the same time? Weither it's my code (autofill destination) or the 2 other options you provided?



    Second problem was not described in words, so can't really visualize WHAT you're doing. You may be right, separate ranges frequently must be dealt with separately.

    Sorry about that. The reason I do a find from cell B52 is because every time I run the report, the line will be different. From this line though (let's call it line X), I want to remove all data of line X and below for column B-1 (column A), column B+52, column B+53, etc. Hope it clarifies a bit.
    Thanks for the help provided, it's appreciated!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro speed improvement

    Lines 2 and 3 do need to be processed separately.

+ 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