+ Reply to Thread
Results 1 to 8 of 8

Formula to Remove Duplicates

  1. #1
    Registered User
    Join Date
    11-23-2014
    Location
    Wichita
    MS-Off Ver
    2007
    Posts
    17

    Formula to Remove Duplicates

    Is there a formula that I can cover a large portion of a sheet in, that will return data from another sheet, minus rows containing duplicate values in columns A and B?
    I know how to use the "remove duplicates" and this does achieve the same end result, however for the purpose I am needing a formula.
    I've attached an example of the data (columns A:C) and the desired results (columns E:G).

    Duplicates.xlsx

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Formula to Remove Duplicates

    by far the easiest way is to chuck it in a pivot table

    secondary way of doing it would be with CSE formula for the first column and then just vlookup for the 2nd and 3rd
    http://www.get-digital-help.com/2009...om-one-column/
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula to Remove Duplicates

    Enter this formula in E3 and copy it down

    =IFERROR(INDEX(A$3:A$10,MATCH(0,INDEX(COUNTIF(E$2:E2,A$3:A$10),,),)),"")

    Enter formula in F3 and pull formula to the right and then down. Format last column as Date.

    =IFERROR(VLOOKUP($E3,$A$3:$C$10,COLUMNS($A:B),0),"")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    11-23-2014
    Location
    Wichita
    MS-Off Ver
    2007
    Posts
    17

    Re: Formula to Remove Duplicates

    I should've mentioned that column A could contain a duplicate several times with a unique value in column B.
    I would want each with a unique in B to be brought forward. Therefore I need something to verify that column A and B both are duplicates, to omit.
    Please see below for a slightly better example of my data and desired result.
    Thanks for the help


    ABC123 J01000 1/1/2015 ABC123 J01000 1/1/15
    ABC125 J01001 2/1/2015 ABC125 J01001 2/1/15
    ABC125 J01004 3/1/2015 ABC125 J01004 3/1/15
    ABC125 J01004 3/1/2015 ABC126 J01005 3/1/15
    ABC126 J01005 3/1/2015 ABC127 J01002 4/1/15
    ABC127 J01002 4/1/2015 ABC128 J01003 8/1/15
    ABC127 J01002 4/1/2015
    ABC128 J01003 8/1/2015

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula to Remove Duplicates

    Maybe this one with a helper column

    in D3 and copy down

    =COUNTIF(A$3:B3,B3)

    Enter formula in E3 and pull formula to the right and then down. Format last column as Date.

    =IFERROR(INDEX(A$3:A$10,SMALL(IF($D$3:$D$10=1,ROW($D$3:$D$10)-ROW($A$3)+1),ROWS(E$3:E3))),"")

    ***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

    Data Range
    A
    B
    C
    D
    E
    F
    G
    1
    Data
    Result
    2
    3
    ABC123
    J01000
    1/1/2015
    1
    ABC123
    J01000
    1/1/2015
    4
    ABC125
    J01001
    2/1/2015
    1
    ABC125
    J01001
    2/1/2015
    5
    ABC125
    J01004
    3/1/2015
    1
    ABC125
    J01004
    3/1/2015
    6
    ABC125
    J01004
    3/1/2015
    2
    ABC126
    J01005
    3/1/2015
    7
    ABC126
    J01005
    3/1/2015
    1
    ABC127
    J01002
    4/1/2015
    8
    ABC127
    J01002
    4/1/2015
    1
    ABC128
    J01003
    8/1/2015
    9
    ABC127
    J01002
    4/1/2015
    2
    10
    ABC128
    J01003
    8/1/2015
    1

  6. #6
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Formula to Remove Duplicates

    Could be so.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-23-2014
    Location
    Wichita
    MS-Off Ver
    2007
    Posts
    17

    Re: Formula to Remove Duplicates

    Thanks AlKey this does work, any way to get around the helper column though?
    I've attached a better example for ease.

    DUPLICATES 2.xlsx

  8. #8
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Formula to Remove Duplicates

    And if such an option?
    Attached Files Attached Files

+ 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. How to remove duplicates inside formula
    By eraserboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-20-2014, 02:34 PM
  2. Formula or VBA code to remove duplicates
    By james19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-11-2014, 05:15 AM
  3. Formula to remove duplicates from a list
    By AK262007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-04-2014, 04:56 AM
  4. [SOLVED] Remove Duplicates out of formula
    By amasson in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 04-03-2014, 11:49 AM
  5. [SOLVED] REMOVE duplicates by formula
    By makinmomb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2014, 07:44 AM
  6. [SOLVED] Using a formula to remove duplicates?
    By controlfreak in forum Excel General
    Replies: 5
    Last Post: 09-05-2013, 11:49 AM
  7. Replies: 2
    Last Post: 03-20-2011, 11:19 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