+ Reply to Thread
Results 1 to 13 of 13

Find Duplicates with 2 conditions

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Find Duplicates with 2 conditions

    Hi All,
    Thanks to the forum Guru’s especially AB33, Srinivasmurthy, Jhren, Nilem, Norie, Lotuxel and each and every one of the members of the forum who have helped me in improving my small brain.

    I need to specifically mention AB33 and Srinivasmurthy who helped me to learn basics and I could make a workable solution that is very useful for our people.

    I have a problem with the solution where few rows does not get transferred from sheet “POData” to “PO List” sheet. PO List sheet is generated through VBA Pivot with certain conditions and filters.
    I want modification to my Macro codes “POPT” and “FormatPO” so that data pertaining to both Rows (40 & 41 in the sample file attached highlighted in Red color) get transferred from “POData” to “PO List”.

    Sorry my code may be funny but i am still learner and trying my best to improve myself from various posts of this forum, thank you for your understanding..

    Look forward for your kindest advice.

    Best Regards,
    Narasimharao
    Attached Files Attached Files
    Last edited by Narasimharao Nandula; 06-19-2014 at 03:51 AM. Reason: Change of Title

  2. #2
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Hi All,

    Hoping to get some help on above. Any queries?

    Best Regards,
    Narasimharao
    Last edited by Narasimharao Nandula; 06-19-2014 at 03:54 AM.

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Dear All,

    If there is any chance to have a look at my query, Kindly help me. Eagerly awaiting for your suggestions.

    Best Regards,
    Narasimharao
    Last edited by Narasimharao Nandula; 06-19-2014 at 03:55 AM.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,705

    Re: Changes to Existing VBA Solution

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Hi ALL,

    I have thought of finding alternatives to above problem. Is there any way to find Duplicates of column "M" in sheet "POData" based on matching fields in I & N? I want macro to pop up the cells for correction by user. If user don't correct data, macro run should stop prompting message to correct data.

    Look forward for your advise.

    Best Regards,

    Narasimharao

  6. #6
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: Find Duplicates with 2 conditions

    Hi Narasimharao,

    Your column M is the expected invoice value and you want to find duplicate base on the value? any other unique column you can use, such as Invoice number/ PO number or else?


    The formula I use would be :
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Cheers,
    Lex

  7. #7
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Hi Lexusap,

    Thank you for your reply to my query. is there any way to transfer data of respective rows of columns "I" (PO Number) and "M" (expected invoice value) to different sheet when "duplicate" found? Once duplicates found, i want to stop further execution of other macro codes. New sheet name can be "Duplicates".

    Thanks once again for your help and reply.

    Best Regards,
    Narasimharao

  8. #8
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2019
    Posts
    209

    Re: Find Duplicates with 2 conditions

    Hi,

    I have added another sheet named 'duplicate' and click the button to check any duplicate.
    I used the purchase order number as the unique code.

    Cheers
    Lex
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Hi Lexusap,

    Thank you once again for immediate reply and solution. I need one more change. Can the Countif function be changed for duplicate check of "I"&"K" together? This reduces number of lines in duplicate sheet.

    Look forward for your further advise. Thanks once again.

    Best Regards,

    Nandula

  10. #10
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Hi Lexusap,

    I found another problem with macro run. My POData sheet contains more than 25,000 rows. Macro run with existing code that is provided by you taking almost 10 Mins to complete. I tried to modify as follows:
    Kindly suggest is there any alternative.

    Best Regards,
    Narasimharao

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Hi All,

    I am still looking for help on the requirement. Meanwhile based on various inputs, i tried to find alternatives to provide solution to our users. I am enclosing revised file which includes full list of items.
    Present code appended below works for me but very slow due to huge volume. So i decided to run the code only for the values which are higher than certain threshold. In my latest file, Sheet POData column "AM" contains True or False.

    Now following code has to run only when the column AM has "True". Can any body help me on this?

    Look forward for your kind advise.

    best regards,
    Narasimharao

    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: Find Duplicates with 2 conditions

    Narasimharao,
    I have amended the code you have. I have removed some lines to speed up the code. On my PC, it took just over 31 seconds to run the code.

    I perhaps could have come up with different code, but not only your request is not clear, but keep changing too. So, this code is easy to amend it your self and should stick with it.

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    04-23-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Find Duplicates with 2 conditions

    Hi AB33 and Lexusap,

    Excellent!!. Thank you for the solution. I will take care of balance part. Thanks once again.

    Best Regards,
    Narasimharao

+ 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. Replies: 2
    Last Post: 04-08-2015, 08:10 AM
  2. [SOLVED] Help needed on a existing solution by stanleydgromjr
    By ark1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2013, 12:41 PM
  3. Replies: 11
    Last Post: 11-04-2013, 04:32 PM
  4. Replies: 3
    Last Post: 10-14-2013, 03:06 PM
  5. Is 'ranking by' a VBA solution or a manual solution?
    By mtw2018 in forum Excel General
    Replies: 2
    Last Post: 04-10-2012, 01:47 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