+ Reply to Thread
Results 1 to 4 of 4

Removing duplicates with multiple columns

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    2

    Removing duplicates with multiple columns

    I have a dataset with two columns that I need to remove certain duplicates from. The first is a list of numbers, the second is text strings. For example

    5 | Apple
    3 | Banana
    5 | Apricot
    5 | Apple
    2 | Banana
    3 | Apricot

    I need to remove only the duplicate numbers that also have the same text string. So in the above I'd need to take out one of the 5|Apple rows, but nothing else. I can remove duplicates from a single column no problem but am running into difficulty figuring it out for two columns, so appreciate if someone could point me in the right direction. I've been trying with the custom filter function.

    Thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Removing duplicates with multiple columns

    Hi and welcome to the forum

    Assuming you want to keep 1 of the duplicate rows, try 1 of these...
    for 2007...
    =COUNTIFS($A$1:A4,A4,$B$1:B4,B4)
    for 2003 (as your profile says)...
    =SUMPRODUCT(($A$1:A4=A4)*($B$1:B4=B4))

    Then apply filters, uncheck "1", and delete what remains
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-08-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Removing duplicates with multiple columns

    Thanks I can't try it out at the moment but I'm sure that will work, so I'll make this as solved. Cheers.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Removing duplicates with multiple columns

    you are welcome and thanks for the feedback... shout if you need more help

    (well, actually, dont shout, I probably wont heard you lol)

+ 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. Text to columns, removing duplicates)
    By acaran02 in forum Excel General
    Replies: 4
    Last Post: 11-18-2014, 06:25 AM
  2. Removing duplicates based on several columns
    By Crackerdaq in forum Excel General
    Replies: 6
    Last Post: 08-13-2013, 10:33 AM
  3. [SOLVED] Removing duplicates from multiple columns (treating each column separately)
    By Rob8489 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-24-2013, 05:56 PM
  4. Removing duplicates from Two columns?
    By dawsonsoo in forum Excel General
    Replies: 5
    Last Post: 03-08-2010, 05:19 PM
  5. Replies: 5
    Last Post: 02-19-2010, 06:03 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