+ Reply to Thread
Results 1 to 2 of 2

Are you able to help Speed Up this Macro?

  1. #1
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Are you able to help Speed Up this Macro?

    Hello again,
    I've been struggling to find a solution to speed up the process time of this Macro but with not much success.
    I have a Chunk of data, about 400k records (Initially I thought it was smaller but was surprised when I tried to work on my other TXT files).
    The Below Macro after putting together thanks to most of you (I'm sure this code will be familiar) is working well.
    However, the process time is taking too long, I've tried it on a record of 300k but after 3 hours it is still running so I decided leaving it overnight.
    True enough, the Macro completes and I got the result.

    My question is, is there anything else that I can do to decrease the process time?
    Or do I just have to live with it? =(
    Additionally, is there a Macro that I could insert along these lines that would give me a count of the process time? Sort of a timer?
    Thank you for taking time reading and I'm looking forward to hearing from you guys.

    -Andrew


    Please Login or Register  to view this content.

    I have also posted this question here..
    Thank you.
    Last edited by Andrew.Trevayne; 08-27-2012 at 01:27 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: Are you able to help Speed Up this Macro?

    I would a think a much simpler macro that:

    1) Inserted a formula into a blank column that effectively did a COUNTA() function on the original data. For instance, if the data is in columns A:Z, then over in AA1 could be:

    =IF(COUNTA(A1:Z1)=0, "Delete", 1)

    2) Then the macro uses the SpecialCells method to highlight all the cells in that column with "text" in them and then deletes those entire rows.


    Please Login or Register  to view this content.
    _________________
    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!)

+ 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