+ Reply to Thread
Results 1 to 16 of 16

High lighting duplicate rows

Hybrid View

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    quebec
    MS-Off Ver
    Excel 2003
    Posts
    9

    High lighting duplicate rows

    I am currently cleaning up a document, my document consists of patient names and information address DOB etc... they have duplicate rows for each some contain a different address in the duplicate and some contain the same address in both records.

    example: (different address)

    jane doe F 11/23/1998 92 Dela Ave Somerset NJ 08873-1614
    jane doe F 11/23/1998 93 Highl Ave Somerset NJ 08873-1614

    john doe F 1/9/2007 911 Wood Drive North Brunswick NJ
    john doe F 1/9/2007 911 Wood Road North Brunswick NJ


    How can I highlight all rows with the persons with different address? or highlight the rows with patients same address.. (I dont want to DELETE) i know this function exists but I need to know which ones are being deleted.

    HELP please no macros i have no idea how to use them

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: High lighting duplicate rows

    Hi Melly,

    Is this information is a part of single cell OR spread through different cells of a single row?

    If that is a single cell, you can create a quick pivot on that single column and get the counts of the same as data field...

    If the information is stored in different cells of a same row, you can use countif or Sumproduct function to get the counts..


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: High lighting duplicate rows

    Hi,

    Is each piece of data in its own column (Name, Gender, DOB etc...) or is it a single sting of information in the same cell?

    Steve

  4. #4
    Registered User
    Join Date
    06-07-2012
    Location
    quebec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: High lighting duplicate rows

    yes it does have a header of FirstName MiddleInitial LastName Gender Birthdate SSN Address City State Zip Country Phone


    Quote Originally Posted by SteveG View Post
    Hi,

    Is each piece of data in its own column (Name, Gender, DOB etc...) or is it a single sting of information in the same cell?

    Steve

  5. #5
    Registered User
    Join Date
    06-07-2012
    Location
    quebec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: High lighting duplicate rows

    It is a row consisting of 12 cells and about 1700 rows

  6. #6
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: High lighting duplicate rows

    Firstly, because you're using 2003 you need a single cell that you can use in the calculation. Suppose Columns A,B,C,D are Firstname, Surname, Gender, DoB, and data starts in row 2. Add a new column (let's call it E) with the formula =UPPER(A2&B2&C2&D2), which joins those 4 bits of data into one cell. [If you want to define a duplicate using other cells, just add them in to the formula.]
    Now, in column F, put =IF(COUNTIF($E$2:E2,E2)>1,"Duplicate","") and copy it down. NB YOU MUST GET THE DOLLARS IN THE RIGHT PLACE!

  7. #7
    Registered User
    Join Date
    06-07-2012
    Location
    quebec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: High lighting duplicate rows

    I am using 2007

  8. #8
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: High lighting duplicate rows

    Still works.... Would be worth updating your profile on the forum though...

  9. #9
    Registered User
    Join Date
    06-07-2012
    Location
    quebec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: High lighting duplicate rows

    I think that was auto populated I didn't put that there sorry (I'm not a forum user usually But I will be doing alot of excel so thought it would be useful to use this one)

  10. #10
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: High lighting duplicate rows

    No problem :-)

    You've picked a good forum! Look at this post - 3 continents/4 countries. The internet at its best...
    Last edited by outofthehat; 06-08-2012 at 02:06 PM.

  11. #11
    Registered User
    Join Date
    06-07-2012
    Location
    quebec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: High lighting duplicate rows

    I cant really do a sample work book as It contains sensitive information.

  12. #12
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: High lighting duplicate rows

    Hi Melly,


    Please upload a sample workbook... thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  13. #13
    Registered User
    Join Date
    06-07-2012
    Location
    quebec
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: High lighting duplicate rows

    Im not finding the code is working that you provided... hmmm they need a way to "delete duplicates" without deleting... simply moving to a new location haa

  14. #14
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: High lighting duplicate rows

    Hi,

    You could do it within Conditional Formatting itself as well using AND and COUNTIF.

    =AND(COUNTIF($A$2:$A$5,$A2)>1,COUNTIF($B$2:$B$5,$B2)>1,COUNTIF($C$2:$C$5,$C2)>1,COUNTIF($D$2:$D$5,$D2)>1,COUNTIF($E$2:$E$5,$E2)>1)

    I used First Name, Last Name, Gender, DOB and SSN for the criteria (columns A, B, C, D, E).

    HTH
    Steve

  15. #15
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: High lighting duplicate rows

    Sorry, thought I'd work in upper case, then forgot to include that in the COUNTIF.... This might solve the problem
    =IF(COUNTIF($E$2:E2,UPPER(E2))>1,"Duplicate","")

  16. #16
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: High lighting duplicate rows

    Hi Melly,

    I understand the data sensitivity.. that is why I asked for sample workbook.. with sample data. not the original ...

    Regards,
    DILIPandey


    <click on below 'star' if this helps>

+ 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