+ Reply to Thread
Results 1 to 3 of 3

Macro to remove duplicates (If duplicate meets all three criteria)

  1. #1
    Registered User
    Join Date
    06-29-2005
    Posts
    12

    Macro to remove duplicates (If duplicate meets all three criteria)

    Also posted on: http://www.ozgrid.com/forum/showthre...877#post677877

    I’m looking for help again.

    I have attached a sample file and the code I have tried is below. I want to clear the contents of any cells in the range (“G5:X947”). If the cell is duplicated.
    A cell is only duplicated if it meets all three criteria of Zone, DALI and Inverter.
    I tried the following code which will remove duplicates but only if the duplicates are in adjacent rows. I need to expand this to remove duplicates if they are in any row.


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by adw223; 08-01-2013 at 05:27 PM. Reason: Add link to same post

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

    Re: Macro to remove duplicates (If duplicate meets all three criteria)

    I have not tested the code you have , but I would not surprise if it does not work as you have merged cells in your data.
    Last edited by AB33; 08-01-2013 at 05:46 PM.

  3. #3
    Registered User
    Join Date
    06-29-2005
    Posts
    12

    Re: Macro to remove duplicates (If duplicate meets all three criteria)

    I know it is better not to have merged cells but I have no choice there is a substantail amount of files and a lot more data on the files than what I have outlined and that is the way I received them. Unfortunatley I'm stuck with it.
    I have worked around the merged cells by clearing the contents of the range of the two merged cells instead of just the cell. The code I have shown actually works and does remove duplicates but only if the duplicates are in adjacent rows. I need to get to loop through all the rows instead of the row just below the current cell.

+ 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. Remove Duplicates with Criteria
    By cowtipper in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-08-2013, 05:40 PM
  2. [SOLVED] Find Duplicates and remove the duplicate entry comparing two columns
    By retrospikz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-04-2013, 03:17 AM
  3. [SOLVED] How to remove duplicate rows only if columns A and B are BOTH duplicates in Excel 2003
    By Benisato in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2012, 03:53 AM
  4. Macro to remove duplicates values and keep unique values bases on multiple criteria
    By Ricker090 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2011, 04:37 PM
  5. Remove Duplicates not removing all duplicate entries
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2008, 05:32 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