+ Reply to Thread
Results 1 to 9 of 9

VBA to Find 4 types of Duplicates with multiple criteria

  1. #1
    Forum Contributor
    Join Date
    06-26-2013
    Location
    Makati
    MS-Off Ver
    Excel 2010
    Posts
    138

    VBA to Find 4 types of Duplicates with multiple criteria

    Hi Guys,

    VBA newbie need some help with reconstructing my code.
    So i have my own code right now,it works but it run really slow ( didnt finish the calculation even i leave it for a night ) .
    So basically i just want to find the duplicates with the criterias and return the 1st member code of the duplicates, if no duplicates just return x.

    I'm sure you guys will understand once you see the workbook. Thanks for the time guys.
    Any help will be greatly appreciated.

    Note: i have tried using formulas for this but run pretty slow too , my data has around 1 million rows. So any help that can make my code works faster?

    Macro.Find Matches.xlsm
    Last edited by Jul Stev; 07-26-2013 at 02:27 AM.

  2. #2
    Forum Contributor
    Join Date
    06-26-2013
    Location
    Makati
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    Hi Guys,

    Im sorry that i forgot to mention, my data has around 1 million rows. So any help that can make my code works faster?

  3. #3
    Forum Contributor
    Join Date
    06-26-2013
    Location
    Makati
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    Bump... No 1 can help?

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    PL see the attached file with array formula in Sheet1(2) and macro with its result in Sheet1.
    Try this on a copy of your original file.
    I feel time required will be far less than what at present macro(you are having) is taking.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-26-2013
    Location
    Makati
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    Hi kvsrinivasamurthy,

    Thank you very much for the reply and the formula, it is indeed faster than my macro.
    For now i just need to know if there is "Macro" that can do the job faster than the formula because as i said i have around 1 million rows in my database, so i need the fastest way. If there is then perhaps some1 will be kind enough to share a way to making the code.

    Any help will be appreciated. Thanks in advance.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    Pl try this macro. It took 6 mins for 150000 rows.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    06-26-2013
    Location
    Makati
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    Hi kvsrinivasamurthy,

    Thanks so much for the code, i tried your code and its a lot faster :D, only 1 problem, when i tried it with 400.000 rows it shows error, is there a limit for the code to works?

  8. #8
    Forum Contributor
    Join Date
    06-26-2013
    Location
    Makati
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    Hi kvsrinivasamurthy,

    I have found the problem already, apparently i have some cells with equal "=" signs and that makes excel read it as an error, now the code works perfectly.

    Thanks for the help,really appreciate it.

    Best Regards,
    Jul

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: VBA to Find 4 types of Duplicates with multiple criteria

    welcome Jul stev.

+ 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. Find Duplicates & Move Data Based on its criteria
    By ryanparrish1986 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2013, 08:44 AM
  2. [SOLVED] Deleting Duplicates Based on Multiple Criteria from Multiple Columns
    By Franklic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2012, 05:31 PM
  3. Deleting multiple duplicates with criteria?
    By lukey2606 in forum Excel General
    Replies: 6
    Last Post: 05-12-2012, 03:08 PM
  4. Need to find duplicates based on criteria in two columns
    By yellowsun60 in forum Excel General
    Replies: 2
    Last Post: 01-11-2012, 07:25 PM
  5. Find Duplicates with Criteria?
    By cavag4 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2011, 06:53 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