+ Reply to Thread
Results 1 to 3 of 3

Deleting duplicates in case of two columns

  1. #1
    Registered User
    Join Date
    05-25-2016
    Location
    Tamil Nadu
    MS-Off Ver
    2013
    Posts
    2

    Deleting duplicates in case of two columns

    Hello Guys,

    I’ve an excel sheet filled with about 5000 entries and I’m looking to sort them and came across a problem that cannot be solved without coding. I just wanted to get opinion from you guys. Please post the full code if possible. I don't know if I can do it with macro alone or if I need VBA or it can be solved by entering a formula in the formula bar. Anyway please walk me through the code too if possible. I really appreciate the help. I have attached the images step by step to make it easier for you. So, I’ll explain.

    I have two columns as shown in the picture I’ve uploaded. (Image Link: http://www.excelforum.com/attachment...1&d=1464165169)

    As you’ve seen column A contain names and column B contains information about what that name corresponds to. Now just like this there are about 4765 entries in my excel worksheet. What I need to do is eliminate the duplicates. Like in the image you can see that the name Jimmy appears 3 times in column A and each time it has a corresponding B column value. What I need to do is to do the following:

    1. Check for duplicates in column ‘A’. (Image Link: http://i68.tinypic.com/14119at.png)
    2. For the duplicates found in column ‘A’ check if the corresponding ‘B’ cell has duplicates. (Image Link: http://i65.tinypic.com/6ggeow.png)
    3. If ‘A’ and ‘B’ cells are exact duplicates then delete the duplicate value or clear the duplicate cell. (Image Link: http://i64.tinypic.com/1qmii9.png)
    4. If ‘B’ value is unique and ‘A’ value has duplicates then concatenate ‘B’ values with comma separator. (Image Link: http://i67.tinypic.com/4zyxzk.png)
    5. Then after concatenation delete the rest of the duplicate ‘A’ and corresponding ‘B’ values leaving only one ‘A’ value and concatenated corresponding ‘B’ value.
    Attached Images Attached Images

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Deleting duplicates in case of two columns

    Make use of Remove Duplicates Menu.

    http://www.excel-easy.com/examples/r...uplicates.html


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    05-25-2016
    Location
    Tamil Nadu
    MS-Off Ver
    2013
    Posts
    2

    Re: Deleting duplicates in case of two columns

    Hello Again,

    I know how to use the Remove Duplicates Menu. But the case I explained will not work with it. Please check the images of the example I have shown before answering.

+ 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: 07-30-2014, 02:37 PM
  2. Delete duplicates with lower case and upper case taken into account?
    By Tinwelende in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-17-2013, 11:35 AM
  3. Deleting non-duplicates from multiple columns
    By Adam_Passman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2012, 07:50 AM
  4. Concatenate values from columns and deleting duplicates
    By RandomP in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2011, 06:20 PM
  5. Replies: 3
    Last Post: 11-09-2011, 12:36 PM
  6. Excel 2007 : Deleting Duplicates WHILE maintaining additional columns
    By bioinformatics_guy in forum Excel General
    Replies: 0
    Last Post: 03-02-2011, 12:56 PM
  7. Deleting duplicates in different columns
    By callardt in forum Excel General
    Replies: 2
    Last Post: 07-11-2008, 07:36 AM

Tags for this Thread

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