+ Reply to Thread
Results 1 to 2 of 2

Removing duplicate rows when cells are identical

  1. #1
    Registered User
    Join Date
    04-17-2009
    Location
    France
    MS-Off Ver
    Excel 2003
    Posts
    8

    Removing duplicate rows when cells are identical

    Hello,
    I'm working with a translation memory (TM) that has over 50,000 entries and my software is going bezerk when I ask it to delete all redundant entries, so I have to do it manually via excel, but have no idea how to go about doing that.

    I've uploaded a 9 line example of my TM.

    Line 1 is the coding that my TM uses at the beginning of every TM.

    Line 2 and 3 are similar, the difference being that the French (colomn E) is slightly different, but the English (column G) is identical. I need to delete one of the lines (either one is fine).

    Line 4 and 5 are the same, meaning both columns G and H contain the same translation on each line.

    Line 6 and 7 are not the same and both need to be kept.

    Line 8 and 9 are similar, the difference being that the English (colomn G) is slightly different, but the French (column E) is identical. I need to delete one of the lines (either one is fine).

    I hope this is clear enough for you to understand the four different cases I have in my 50,000 line document...I don't mind using one macro for each case, if that's the easiest and most straightforward way to do it.

    Thanks for any of your help.

    Cynthia
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-18-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Removing duplicate rows when cells are identical

    Sub DeleteDupes()

    Range("A1").Select

    Do While IsEmpty(ActiveCell) = False
    If ActiveCell.Offset(0, 4).Value = ActiveCell.Offset(1, 4).Value Or ActiveCell.Offset(0, 6).Value = ActiveCell.Offset(1, 6).Value Then
    ActiveCell.EntireRow.Delete
    Else
    ActiveCell.Offset(1, 0).Select
    End If
    Loop

    End Sub

    Would work, assuming the duplicate lines will always be next to each other?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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