+ Reply to Thread
Results 1 to 7 of 7

Find duplicate in another column and delete that row

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Vellore, India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Find duplicate in another column and delete that row

    I have a different situation. Column A contains the Item No. and Column Contains its link Item No. But the Link Item No. is again coming as Item No. in Column A and its Link Item No. is that which has come in the first instance. I want to find out the First Item No.'s Link Item No. in Column B and delete the row. Normally finding duplicates shows all the numbers in Column B as Duplicate. Sample is provided below:

    Item No Link Item No.
    123 456
    234 567
    456 123
    345 678
    567 234
    678 345

    In the above sample I want to delete the rows 3,5 & 6.

    Any help is appreciated.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find duplicate in another column and delete that row

    2 suggestions. In both of these we use a helper and hidden column. In this column C we use this formula.

    =IF(COUNTIF($A$2:B2;A3)+COUNTIF($A$2:B2;B3)>1;1;"")

    Then you have 3 options

    1) Create a new table using this ARRAY formula.

    =IF(ISERROR(INDEX(A$2:A$20;SMALL(IF($C$2:$C$20=1;ROW(A$2:A$20)-1);ROW(A1))));"";INDEX(A$2:A$20;SMALL(IF($C$2:$C$20=1;ROW(A$2:A$20)-1);ROW(A1))))

    2) Filter your table according column C OR

    3) Delete the rows without 1 in column c
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    03-05-2009
    Location
    Vellore, India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Find duplicate in another column and delete that row

    This is what I exactly wanted. It worked fantastically. Thank you so much.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find duplicate in another column and delete that row

    You are welcome!

    At last which of the solutions do you prefer?

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Find duplicate in another column and delete that row

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Find duplicate in another column and delete that row

    try this array formula
    {=IFERROR(INDEX(A$2:A$7,SMALL(IF(MATCH($A$2:$A$7,$A$2:$A$7,0)<MATCH($A$2:$A$7,$B$2:$B$7,0),MATCH($A$2:$A$7,$A$2:$A$7,0)),ROW(1:1))),"")}

    drag right and down

  7. #7
    Registered User
    Join Date
    03-05-2009
    Location
    Vellore, India
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Find duplicate in another column and delete that row

    Will definitely do in future. Thank you.

+ 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