+ Reply to Thread
Results 1 to 10 of 10

Removing Duplicates - while keeping original data series

  1. #1
    Registered User
    Join Date
    11-10-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    6

    Removing Duplicates - while keeping original data series

    Hello,

    I would like to use information from one column in a different section of the worksheet. However, this column contains duplicates I do not want. I've found out how to remove these duplicates by using the Data ribbon, but this filters your selection where it is located, whereas I want to keep the original set of data the same in it's original location.

    Does that make sense? I've attached a sample worksheet.



    Thanks,

    Tom
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Removing Duplicates - while keeping original data series

    Try this array formula** entered in D3:

    =IFERROR(INDEX(A$3:A$1000,MATCH(0,COUNTIF(D$2:D2,A$3:A$1000),0)),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.

    There must be a cell above the first formula cell and this cell must not contain an entry that is also in the extraction range.

    You might also be interested in this method:

    http://www.excelforum.com/excel-prog...pty-cells.html
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,502

    Re: Removing Duplicates - while keeping original data series

    you can always use the advance filter function where you copy to another location unique records only.

    EDIT: now that i've read your attachment notes this wouldn't work if you want it to be automatic.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Removing Duplicates - while keeping original data series

    Try this sample.
    Just change one of the values in the list and the filtered uniques get updated.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-10-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Removing Duplicates - while keeping original data series

    Hi everyone - thanks for your responses so far.

    Tony - I'd prefer to use a formula over a macro if possible - but the formula you've suggested is behaving a little oddly for me. The data in column D keeps updating/changing from row 8 downwards. D8 keeps switching to the value of D7, and all the cells below change also, and then back again to what I think is the correct value for D8, 55.964[....] . I've attached this new file so you can see what I mean - it's quite bizarre!

    Sambo - thanks, but yes I am looking for something automatic of possible.

    Rudi - that macro seems to do the trick. How do I change that code to put the output list in a different sheet, say sheet3?

    Thanks again,

    Tom
    Attached Files Attached Files

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Removing Duplicates - while keeping original data series

    I'm unable to open this new file. Excel 2007 just freezes up and I have to kill it through Task Manager.

    Here's your original file with the formula implemented:

    example worksheet(1).xlsx

    In the original file there are 240 unique entries.

  7. #7
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Removing Duplicates - while keeping original data series

    Here is the new macro to shift the unique data to sheet 3.
    Attached Files Attached Files

  8. #8
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,372

    Re: Removing Duplicates - while keeping original data series

    Quote Originally Posted by tomdriscoll View Post
    Hi everyone - thanks for your responses so far.

    Tony - I'd prefer to use a formula over a macro if possible - but the formula you've suggested is behaving a little oddly for me. The data in column D keeps updating/changing from row 8 downwards. D8 keeps switching to the value of D7, and all the cells below change also, and then back again to what I think is the correct value for D8, 55.964[....] . I've attached this new file so you can see what I mean - it's quite bizarre!

    Sambo - thanks, but yes I am looking for something automatic of possible.

    Rudi - that macro seems to do the trick. How do I change that code to put the output list in a different sheet, say sheet3?

    Thanks again,

    Tom
    when you put formula in D3 you must change this part "D$3:D3" with "D$2:D2"

    Cheers
    Azumi

  9. #9
    Registered User
    Join Date
    11-10-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Removing Duplicates - while keeping original data series

    Thanks guys, got this working in my workbook now!

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Removing Duplicates - while keeping original data series

    Good deal. Thanks for the feedback!

+ 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. Merging Duplicate Rows and Keeping Original Data
    By vinnie179 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-19-2014, 07:18 AM
  2. Replies: 7
    Last Post: 10-12-2012, 10:26 PM
  3. Replies: 1
    Last Post: 08-29-2010, 12:06 PM
  4. Copying data but keeping original
    By mellowe in forum Excel General
    Replies: 2
    Last Post: 01-12-2006, 10:25 AM
  5. [SOLVED] Keeping original data format into a Pivot Table
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2005, 09:06 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