+ Reply to Thread
Results 1 to 2 of 2

Delete duplicate (with ref to another cell included).

  1. #1
    Registered User
    Join Date
    03-04-2010
    Location
    England
    MS-Off Ver
    Excel 2002
    Posts
    7

    Delete duplicate (with ref to another cell included).

    Hi all,

    I have a requirement to delete duplicate rows but also ref them against another cell. For example:

    246749 - 325.39
    246749 - 325.06
    246758 - 634.19
    246758 - 634.15
    246757 - 240.75
    246757 - 240.19

    Delete the red ones as they are a duplicate and have the lower number in second colum.
    (There may be more than 2 of each duplicate in the application).

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Delete duplicate (with ref to another cell included).

    perhaps array entered with ctrl shift enter
    =AND(COUNTIF($A$1:$A$20,A1)>1,MIN(IF($A$1:$A$20=A1,$B$1:$B$20,""))=B1)
    dragged down then filter on true and delete
    see link below how to enter array formula
    edit hold that probably
    =MAX(($A$1:$A$20=A1)*($B$1:$B$20))=B1 again array entered then filter on false and delete would be better as that only find top value and if there are more than 2 lower it will find them but i havent thought what happens if 2 max are the same yet doh!
    Last edited by martindwilson; 04-21-2010 at 05:53 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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