+ Reply to Thread
Results 1 to 6 of 6

How to remove duplicates based on two columns

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Question How to remove duplicates based on two columns

    column 1 has names
    column 2 has dates

    The end result I am looking for is that each person should NOT have duplicate dates. For example...

    Joe has two entries for 11/15/2017, there should only be one entry for this.

    Mike has two entries for 10/09/2017, there should only be one entry for this.

    Lucy has two entries for 02/05/2017, there should only be one entry for this ... etc...

    Keep in mind this is just a sample file I created, my real file (which I do not have yet) will have many many names and tons of different dates. So I dont think a forumla referencing the actual names would work.

    Thank you

    *file attached
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-30-2016
    Location
    Gillette, WY
    MS-Off Ver
    Office 365
    Posts
    230

    Re: How to remove duplicates based on two columns

    Which is more important, the name or the date?

  3. #3
    Valued Forum Contributor
    Join Date
    11-02-2016
    Location
    NY
    MS-Off Ver
    2010
    Posts
    459

    Re: How to remove duplicates based on two columns

    You can try a formula (see attached) you can Copy all Non 0's to another location OR Conditional formatting.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: How to remove duplicates based on two columns

    ARRAY formulas (Confirm with Ctrl+Shift+Enter keys together)
    IN I7, then drag across to collum J.
    =IFERROR(INDEX(C$7:C$18,SMALL(IF(ISERROR(MATCH($C$7:$C$18&$D$7:$D$18,$I$6:$I6&$J$6:$J6,0)),ROW($C$7:$C$18),""),1)-ROW($C$6)),"")
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 12-01-2017 at 02:58 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Contributor
    Join Date
    06-28-2013
    Location
    usa
    MS-Off Ver
    Excel 2013
    Posts
    192

    Re: How to remove duplicates based on two columns

    Quote Originally Posted by kvsrinivasamurthy View Post
    ARRAY formulas (Confirm with Ctrl+Shift+Enter keys together)
    IN I7, then drag across to collum J.
    =IFERROR(INDEX(C$7:C$18,SMALL(IF(ISERROR(MATCH($C$7:$C$18&$D$7:$D$18,$I$6:$I6&$J$6:$J6,0)),ROW($C$7:$C$18),""),1)-ROW($C$6)),"")

    Thank you, looks like it did the trick but I am trying to follow what you did. Are you saying to go in column I and drag to column J? I tried that and its just a blank cell, I do not see anything happening.

    @tfiske - I think the name would be the driving factor for the date.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: How to remove duplicates based on two columns

    Enter ARRAY formula in I7, then copy to I & J columns to the required numbers of rows.


    To enter ARRAY formula
    Paste the formula
    Press F2
    Press Ctrl+Shift+Enter keys together.
    formula will be covered with{} brackets by exce

+ 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. [SOLVED] Sort and remove duplicates based on 3 columns
    By gauti14 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2016, 04:51 PM
  2. [SOLVED] Remove duplicates from all columns.
    By DanzaNZ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2016, 08:31 PM
  3. Remove Duplicates in columns
    By naveenmarapaka in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-31-2014, 11:10 AM
  4. Compare 2 columns and remove duplicates in both columns when found
    By 1dtms in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2013, 02:19 AM
  5. Remove duplicates from multiple columns using VBA
    By rbs123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2013, 03:48 AM
  6. [SOLVED] Remove rows based on duplicates in certain columns, and merge data from another column
    By yanagi600 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 01-02-2013, 04:17 PM
  7. Remove duplicates loop through columns
    By closerb4 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2011, 03:30 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