+ Reply to Thread
Results 1 to 1 of 1

Duplicates not deleting in Sheet even though code is correct

  1. #1
    Registered User
    Join Date
    06-13-2016
    Location
    NJ
    MS-Off Ver
    2010
    Posts
    95

    Duplicates not deleting in Sheet even though code is correct

    Hi,

    The attached workbook should delete duplicates from A12 onwards if that company is on MasterSheet with the same ID(B5).

    The code works if I create a new sheet and manually type in info that matches and use that new sheet as teh reference sheet instead of MasterSheet.
    However, data in MasterSheet is not inputted and typed manually but feeded in using a macro. Then MasterSheet itself removes any duplicates using the remove duplicate function in Data in teh toolbar.

    I think for some reason, this data reshuffling with the remove duplicates in mastersheet is messing up with the delete duplicates code in add request to identify data on the sheet even though the two run independently of eachother. How can I make sure the matching rows are deleted?

    If you test the sheet as is attached, then the two rows where column D = "YES" should be deleted because those are the only two where the values are duplicated in mastersheet. Hwoever, nothing happens. But if i create a new sheet with those two typed in and ID copied over, and change the code to reference that sheet, the values are deleted correctly.
    Attached Files Attached Files
    Last edited by vpan; 07-06-2016 at 04:24 PM.

+ 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. [SOLVED] Correct Sheet Reference & Code not working?
    By liquidmettle in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-17-2015, 09:33 PM
  2. Correct code for transfer sheet to other sheet
    By ninhmoon in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-11-2015, 12:46 PM
  3. Macro Code - Deleting Duplicates based on same cell value and date comparison
    By Desree86 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2014, 04:01 PM
  4. Replies: 2
    Last Post: 12-17-2013, 11:51 AM
  5. Userform that duplicates Information and places in correct sheet depending on selection
    By ExcelHacks_99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-18-2013, 03:38 PM
  6. Looping code and deleting duplicates
    By '''your code here in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2010, 11:48 AM
  7. Deleting ALL duplicates using Pearson's code
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2005, 09:06 AM

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