+ Reply to Thread
Results 1 to 7 of 7

Remove Duplicates

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    Indianapolis
    MS-Off Ver
    Excel 2013
    Posts
    4

    Remove Duplicates

    First post...apologies if this has been already answered but I cannot seem to find what I am looking for. I am performing multiple audits of computers to ensure they meet our corporate security standards. I've exported a list from AD, our Asset Tracking software, SEPM, SCOM, and WSUS. So, without further ado:

    I have a workbook with 2 sheets, each with a single columns of computer names. The data in both places can be duplicate or unique. What I need to do is compare BOTH sheets to each other and remove the rows from BOTH sheets that are common to both, thus leaving me with the unique values. The result should be Sheet 1 containing all the entries that are NOT in Sheet 2 and vice versa. As I will be doing this audit against multiple data sets over the next few months, I'd like a re-usable macro that I can just copy to other workbooks when I need to.

    Thanks in advance.

    -Blitz

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Remove Duplicates

    Please Login or Register  to view this content.
    Maybe something like that? Assuming that if a value in column A can be used to identify unqiue/duplicates, would be able to provide a better answer with an example workbook

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    Indianapolis
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Remove Duplicates

    Thanks for the reply. Your code failed on line 5. As for the sample workbook, I didn't post as I didn't see an option but it also seems irrelevant to me.

    Sheet1 Sheet2
    Comp01 Comp02
    Comp02 Comp04
    Comp10 Comp10
    Comp19 Comp20
    Comp20 Comp21

    The end result should be:

    Sheet1 Sheet2
    Comp01 Comp04
    Comp19 Comp21

    That is as simple as I can make it.

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Remove Duplicates

    Hi to upload the worksheet, click go advanced then manage attachments. It is always a good idea to upload a workbook, these things are always a lot easier with an example of the data to work on. For your particular issue, it is particularly relevent. You are also much more likely to get a response/solution.

    anyway, noticed a few "issues" with my code, try:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-21-2013
    Location
    Indianapolis
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Remove Duplicates

    Thank you for the instructions, I have uploaded a copy of my data subset. As for your fixed code, it failed again at line 7.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Remove Duplicates

    Stupid mistake on my part, sorry.

    Please Login or Register  to view this content.
    seems to work on your example.

  7. #7
    Registered User
    Join Date
    11-21-2013
    Location
    Indianapolis
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Remove Duplicates

    That's it! You rock! Cheers!

+ 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: 1
    Last Post: 10-23-2012, 09:12 AM
  2. Replies: 5
    Last Post: 02-28-2012, 02:52 PM
  3. Need VBA code to remove entries if there are duplicates (remove them totally)
    By BrandonFromSingapore in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2012, 12:50 AM
  4. Replies: 2
    Last Post: 03-20-2011, 11:19 AM
  5. remove duplicates doesn't remove A1
    By chrx74 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-08-2007, 05:02 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