Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Help remove duplicate rows

  1. #11
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Tom your code will be making excel not respond because it has a large load it is still working mircosoft just deems it as "Not Responding" if she leaves it to do its thing it will finish eventually I had one with loops and 45000 rows and it only took about half hour i can post the code if needed.

  2. #12

    Join Date
    Mar 2002
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-23 19:40, brettvba wrote:
    Tom your code will be making excel not respond because it has a large load it is still working mircosoft just deems it as "Not Responding" if she leaves it to do its thing it will finish eventually I had one with loops and 45000 rows and it only took about half hour i can post the code if needed.

    Run time is always a problem if loops are used on large amounts of data.
    For this particular question a loop is not necessary (and not desirable).
    You say that you have a macro that "Only"(!) takes half an hour.
    There could well be a more efficient way of writing the code. Post it if you wish.

  3. #13
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Tom loves loops...
    A loop a day keeps the boss away...
    Am still an inexperienced programmer.
    Will loop until it's worth it to me to improve my code. A millisecond or bitty-byte of ram here or there does not matter for what I do.
    Tom a.k.a. "LOOP KING"

  4. #14

    Join Date
    Mar 2002
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-23 20:07, TsTom wrote:
    Tom loves loops...
    A loop a day keeps the boss away...
    Am still an inexperienced programmer.
    Will loop until it's worth it to me to improve my code. A millisecond or bitty-byte of ram here or there does not matter for what I do.
    Tom a.k.a. "LOOP KING"

    But it is usually not just a "millisecond or bitty-byte of ram here or there".
    Brettvaba's macro that "only" takes half an hour is quite often typical of inappropriate use of loops - run times can often be reduced from many minutes to just a few seconds.

    It is generally good practice (more efficient) to avoid loops whenever possible and make use instead of available Excel built-in functions.
    This also often has the advantage of macros being recordable so that they can be created without any VBA knowledge.

  5. #15
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I concede, you are correct!

  6. #16
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    but it all depends on that the situation is and in my case it was appropriate, but quite right a lot of tuning can speed up a macro from half an hour to 1 minute!

  7. #17

    Join Date
    Mar 2002
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-23 21:26, brettvba wrote:
    but it all depends on that the situation is and in my case it was appropriate, but quite right a lot of tuning can speed up a macro from half an hour to 1 minute!

    Would be interested to see your code.

  8. #18
    Board Regular wilkisa's Avatar
    Join Date
    Apr 2002
    Location
    Decatur IL, USA
    Posts
    635
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Brabantio, I tried to record according to the steps you provided and it deleted the entire sheet! So I just copy/pasted the code you provided and it worked like a charm. Thanks to everyone for all you help.

  9. #19

    Join Date
    Mar 2002
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-24 05:48, wilkisa wrote:
    Brabantio, I tried to record according to the steps you provided and it deleted the entire sheet! So I just copy/pasted the code you provided and it worked like a charm. Thanks to everyone for all you help.

    You must have done something different from the steps listed.
    Try stepping through the macro to see the steps. It is worth seeing how it does it, so that you can use similar procedures in future.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •