+ Reply to Thread
Results 1 to 8 of 8

Delete Duplicates in Multiple Cells & Multiple Columns

  1. #1
    Registered User
    Join Date
    05-05-2017
    Location
    New York
    MS-Off Ver
    2011
    Posts
    3

    Delete Duplicates in Multiple Cells & Multiple Columns

    Hi Everyone,

    I'm new here and I want to say thanks to everyone who might be able to help me with this, I'm no Excel expert and can't seem to figure out how to create a macro or a code to deal with this problem. I have a sheet with multiple rows and columns A through K. The cells in column A is unique, but all rows may have duplicates in multiple cells and columns. For ex. B11, D11, E11, F11 are all duplicate phone numbers. Is there a way to delete the duplicates with a code? I have tried the automatic "Remove Duplicates" but since the entire rows are not looking the same it won't work. I want to be able to highlight the duplicate values in each cell with for ex. "Conditional Formatting" and then delete all but 1 unique value.

    Not sure if I'm making any sense, but I have looked everywhere for a solution, and this is my last stop in trying to fix this.

    Any advise is appreciated.

    Thanks!
    Attached Files Attached Files
    Last edited by jennysoderquist; 05-05-2017 at 03:30 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Delete Duplicates in Multiple Cells & Multiple Columns

    Hello jennysoderquist,

    Welcome to the forum!

    For us to answer your questions quickly and correctly, you should post a copy of the workbook you are using.

    Before you post, please either redact or change any information in your copy that may be confidential or sensitive.


    How to Post your Workbook
    1. At the bottom of your post, click the button GO ADVANCED.
    2. When the page reloads, look for the section titled Additional Options
    3. Look for the heading Manage Attachments: and click on the link Manage Attachments
    4. The page will launch the uploader and open a new window.
    5. Click the button Choose File in the upper left corner.
    6. Select the file you want to upload.
    7. Click the button Upload at the far right.
    8. When the upload is complete, close the window.
    Last edited by Leith Ross; 05-05-2017 at 03:34 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Delete Duplicates in Multiple Cells & Multiple Columns

    Hello jennysoderquist,

    The following macro has been added to the attached workbook and has been tested.

    Remove Duplicates Macro Code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-05-2017
    Location
    New York
    MS-Off Ver
    2011
    Posts
    3

    Re: Delete Duplicates in Multiple Cells & Multiple Columns

    Thank you for your help Leith Ross! Not sure if I'm doing something incorrect, but when I'm downloading the file and running the above macro I get the following message "License information for this component not found. You do not have an appropriate license to use this functionality in the design environment (Error 429)" I realize that that is not your problem, but do you know why and if I can fix it?

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Delete Duplicates in Multiple Cells & Multiple Columns

    Hello Jenny,

    This error occurs with the Mac Office version. It does not allow VBA to import other libraries. The library in this case is the Scripting Runtime library of which the Dictionary is part.

    I use the Dictionary more than a Collection object. The both work basically the same but the Dictionary has other features that the Collection does not have. These additional features make coding more complex data handling much easier.

    Anyway, here is the workaround using a Collection object. Delete the old the macro then copy and paste this one in it's place.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Delete Duplicates in Multiple Cells & Multiple Columns

    Wow stupid question (my own I mean, which I just removed here), ignore me!
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  7. #7
    Registered User
    Join Date
    05-05-2017
    Location
    New York
    MS-Off Ver
    2011
    Posts
    3

    Re: Delete Duplicates in Multiple Cells & Multiple Columns

    THANK YOU!!!! It worked. This will save me so much time.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Delete Duplicates in Multiple Cells & Multiple Columns

    Hello Jenny,

    You're welcome. I should have noticed you were using Office 2011 the first time I answered.

+ 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. Compare multiple columns and delete duplicates
    By christop in forum Excel General
    Replies: 3
    Last Post: 02-05-2015, 06:24 PM
  2. [SOLVED] Deleting Duplicates Based on Multiple Criteria from Multiple Columns
    By Franklic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2012, 05:31 PM
  3. [SOLVED] Delete multiple empty cells in multiple columns and moving data up, witout Macros
    By CoraF in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-30-2012, 08:23 AM
  4. Compare multiple columns and delete duplicates
    By labrooy in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-03-2011, 08:02 PM
  5. Formula to delete blank cells across multiple columns?
    By SamFunMail in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  6. Formula to delete blank cells across multiple columns?
    By Max in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 08:05 AM
  7. [SOLVED] Formula to delete blank cells across multiple columns?
    By SamFunMail in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 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