+ Reply to Thread
Results 1 to 5 of 5

Need a macro to Compare multiple sheets and Remove Duplicates

  1. #1
    Registered User
    Join Date
    01-21-2015
    Location
    hyderabad
    MS-Off Ver
    2007
    Posts
    73

    Need a macro to Compare multiple sheets and Remove Duplicates

    Hi,


    In a excel file there are some sheets. Each sheet contain Mail id column/columns. If Mail id repeated in all sheets / with in the sheet / some sheets, after running macro, all duplicate mail id's should be deleted. only unique mail id's should be remained.


    Thank you in advance.
    Attached Files Attached Files
    Last edited by ajaypal.sp; 03-27-2015 at 02:57 PM. Reason: Attachment missing

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Need a macro to Compare multiple sheets and Remove Duplicates

    can you upload a desensitized sample of your data with an additional tab(s) showing your desired result?
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

  3. #3
    Registered User
    Join Date
    01-21-2015
    Location
    hyderabad
    MS-Off Ver
    2007
    Posts
    73

    Re: Need a macro to Compare multiple sheets and Remove Duplicates

    Please find the attachment (1st Post).

  4. #4
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Need a macro to Compare multiple sheets and Remove Duplicates

    still kinda tough to discern what you're asking for, but this code searches through every used cell in every worksheet for a "valid" email address (code for IsEmailValid found here: http://www.vbaexpress.com/kb/getarticle.php?kb_id=281 , commented out several of the validation checks since your emails appear to all have a "," at the end making them invalid...) and if it is valid, searches through column A of Sheet1 to try to find it. Assuming that address is not found, it is added to the end of column A in Sheet1. End result was 7,281 unique email addresses listed in Column A of Sheet1.

    Please Login or Register  to view this content.
    As in the attached.

    For future reference, it is probably better to use fake data - make up fake email addresses etc... these look like real people and they may not appreciate your having provided their addresses for all the world to see.
    Attached Files Attached Files
    Last edited by simarui; 03-30-2015 at 11:34 AM.

  5. #5
    Registered User
    Join Date
    01-21-2015
    Location
    hyderabad
    MS-Off Ver
    2007
    Posts
    73

    Re: Need a macro to Compare multiple sheets and Remove Duplicates

    Thank you very much Mr. Simarui.

+ 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. Macro To Compare Multiple Excel sheets and highlight duplicates
    By Rey123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2013, 05:07 AM
  2. Compare, Find and Highlight Duplicates in multiple sheets
    By EvilleT in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-19-2013, 08:42 PM
  3. Replies: 1
    Last Post: 06-13-2012, 06:36 AM
  4. How to compare two columns and remove duplicates?
    By username123 in forum Excel General
    Replies: 15
    Last Post: 07-05-2006, 11:06 AM
  5. [SOLVED] how do i compare two columns and remove duplicates?
    By aljernon805 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-09-2005, 12:10 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