+ Reply to Thread
Results 1 to 10 of 10

Removing Duplicate Lines.

  1. #1
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Removing Duplicate Lines.

    Hi.
    Here's the problem:

    There is a Column of alphanumeric codes. Each code is repeated multiple times. I'm trying to delete the rows with repeated codes so that I'm left with a spreadsheet of rows with only unique codes, no repeats.

    I've been trying to match the code cell with the cell below it, and if that code = the reference code, delete entire row. But I'm having a ton of trouble with that.

    I'm attaching an abridged example. The codes I'm referring to are in Column D. Can any one please help?

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Removing Duplicate Lines.

    There are no duplicated post in your example.

    I added the yellow cell to reproduce duplicated post.

    You can filter on count on a value of 2 an delete this rows.

    Or with Excel 2007, you can use remove duplicates.

    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    01-07-2013
    Location
    south africa
    MS-Off Ver
    Excel 2003-13
    Posts
    210

    Re: Removing Duplicate Lines.

    Greetings

    It is not clear from the example whether you are trying to get a list of unique values in your column D ignoring all other data or whether you are trying to remove duplicate records from the rows.
    Getting a list of values of column D, you could use a pivot table.

    Suggestion by oeldere is to remove duplicate rows

    Regards

  4. #4
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Removing Duplicate Lines.

    The duplicates in the example are the Codes under "Region" or column D.
    I'd like to remove all rows but 1 row for each individual region code.
    It's hard to put into words.
    I'm reattaching the example with an example of what I'd like the final result to be.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Removing Duplicate Lines.

    Please Login or Register  to view this content.
    and drag down.

    than make an filter and select everything except 1.

    then you can delete the selected rows.

    you get the result you want.

    See the attached file for the formula.

    You'll find it on the sheet Oeldere.

    Do you have questions or comments, just ask or comment.
    Attached Files Attached Files

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Removing Duplicate Lines.

    another way

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  7. #7
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Removing Duplicate Lines.

    Sorry for the lack of clarity on this. I'm having trouble trying to define what I'm trying to do.
    I'm trying to have a list of the values in column D, along with the rest of the data in that values' row. It doesn't matter which row's data are kept and which rows data are deleted, so long as the values in column D do not repeat.

    I've been trying to check the value in D against the value in the cell below, then either delete the row or move on to the next row, based on whether the value in the cells are equal or not.

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Removing Duplicate Lines.

    Without an clear example, I won't be able to understand what you're up to.

  9. #9
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Removing Duplicate Lines.

    Hey. The countif works fine. Thanks.

  10. #10
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: Removing Duplicate Lines.

    Give this a try

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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