+ Reply to Thread
Results 1 to 3 of 3

Removing identical lines - if 2 cells equal

  1. #1
    Registered User
    Join Date
    02-19-2015
    Location
    Dallas, Tx
    MS-Off Ver
    2013
    Posts
    2

    Removing identical lines - if 2 cells equal

    I have a large spreadsheet that has some duplicates in it. However, some of the duplicates should remain. If line 1 & 2 are identical in column D & E then one line should be removed. If they are not identical then the line should be skipped. Any suggestions?

  2. #2
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: Removing identical lines - if 2 cells equal

    seems like this oughta work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    note it is only looking at consecutive lines (i.e. line 1 & 2) ... if there are nonconsecutive duplicates (i.e. line 1 & 3) these will not be deleted.
    Hope I could help - if your post has been solved don't forget to mark it as such.

    Clicking the * below is a great way to say thanks!

    "Drowning in 10 feet of water isn?t any different than drowning in a million feet. And if you can swim, it doesn?t matter how deep the ocean is. At some level, once you realize you?re in water that?s too deep to stand, you have to have a very different approach," - Joi Ito

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Removing identical lines - if 2 cells equal

    Sort by Columns D and then E

    put a formula in a row two of a new column like =if(and("D1"="D2","E1"="E2"),1,"") and fill down
    copy paste the values

    then sort by this new column

    Delete anything with a 1 in the new column.

    This is best done with a macro.

    So what columns is your data in and which column is the best place to put this equation?
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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. Macro for removing subtotals that equal zero including the lines that make up the total
    By vasanti bhudia in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2013, 12:51 PM
  2. Removing duplicate rows when cells are identical
    By cynthia74 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2011, 11:38 AM
  3. Removing Rows With Identical Data and Merging Cells
    By Burnout in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-17-2011, 01:07 PM
  4. Removing Grid Lines on Specific Cells?
    By Xyfy in forum Excel General
    Replies: 4
    Last Post: 09-14-2007, 12:09 PM
  5. Highlight Cells if Value Equal to a Certain Amount on Subtotal Lines
    By jeffc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-27-2007, 01:09 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