+ Reply to Thread
Results 1 to 8 of 8

Highlighting duplicate information within excel files

  1. #1
    Registered User
    Join Date
    02-17-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    5

    Highlighting duplicate information within excel files

    I need to compare two columns of data within an excel file. In the first column I'm looking for duplicate numbers within the column, I then need to check if any in the rows of these duplicate items data within the second column is also duplicated in the the next column of these rows. If so I want to in some matter highlight whenever this is the case. How can I do this automatically?

    To make it clearer please see below: I would only want rows index number 2 and 5 highlighted in this example. As both data in column A and B are duplicates.

    Index A B
    1 123 A
    2 125 A
    3 123 B
    4 134 B
    5 125 A
    6 134 C
    7 123 D


    Hope that makes sense. Can anyone suggest a solution?

  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: Highlighting duplicate information within excel files

    with data in a1:b7
    select range a1:b7 the use conditional format
    =SUMPRODUCT(($A$1:$A$7=$A1)*($B$1:$B$7=$B1))>1
    "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

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Highlighting duplicate information within excel files

    See attached...

    Dom
    Attached Files Attached Files
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

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

  4. #4
    Forum Contributor
    Join Date
    05-14-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    187

    Smile Re: Highlighting duplicate information within excel files

    Please see the attached file

    Regards,

    Veejar
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-17-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Highlighting duplicate information within excel files

    Sorry I didn't make myself clear the example I posted with some numbers and letters only simplified expression of problem to try and explain it in actual fact more along the lines of that attached.

    Several files of 1000s of items with different serial number lengths (some blank) and with a part number (of different lengths and sometimes blank) that have to seprate out from information infront of it.

    So I want to pick out rows where both columns are duplicates, such as 11 and 17. Ignoring rows where one column is blank.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-17-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Highlighting duplicate information within excel files

    Have tried with the following formulas in two new columns:

    =IF(A6="","",CONCATENATE(RIGHT(B6,12),A6))

    and

    =IF(COUNTIF(C:C,C6)>100000,"",COUNTIF(C:C,C6))

    And then filtered out the blanks and 1s from the final column.

    But really I’m looking for something that will not only highlight which rows are duplicates, but also match them up together. To save me searching through all the duplicate rows.

  7. #7
    Forum Contributor
    Join Date
    05-14-2010
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    187

    Re: Highlighting duplicate information within excel files

    Hi WAS0696,

    Please see my previous post.

    Regards,

    Veejar

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

    Re: Highlighting duplicate information within excel files

    =SUMPRODUCT(($A$6:$A$57=$A6)*($A$6:$A$57<>"")*($B$6:$B$57=$B6)*($B$6:$B$57<>""))>1
    adjust range to suit

+ 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