+ Reply to Thread
Results 1 to 7 of 7

Compare 2 columns for duplicates within the columns and against the 2 columns

  1. #1
    Registered User
    Join Date
    12-21-2012
    Location
    California
    MS-Off Ver
    Excel 2011 for mac
    Posts
    4

    Compare 2 columns for duplicates within the columns and against the 2 columns

    This is what I am trying to do and would love someone to show me the correct formula... I have been banging my head against the wall trying to figure it out..

    Column B contains the persons last name, Column I contains the address.

    I want to Excel to look for duplicates within Column B and within Column I (separately within each column) then ONLY flag the cells red in shaded color if 1) the cell is a duplicate within itself in column I AND it also has the same last name showing in Column B.

    Is this clear??

    your help would be greatly appreciated...

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Compare 2 columns for duplicates within the columns and against the 2 columns

    How about using a helper column and concatenate column B with I and then format the helper column.

    Example, I used column J as the helper column...

    Conditional Formatting
    • Highlight applicable range >> J2:J20
    • Home Tab >> Styles >> Conditional Formatting
    • New Rule >> Use a formula to determine which cells to format
    • Edit the Rule Description: Format values where this formula is true: =COUNTIF($J$2:$J$20,J2)>1
    • Format… [Number, Font, Border, Fill]
    • OK >> OK

    If this does not do it for you, then how about a sample workbook with a before and after.
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    12-21-2012
    Location
    California
    MS-Off Ver
    Excel 2011 for mac
    Posts
    4

    Re: Compare 2 columns for duplicates within the columns and against the 2 columns

    Is it possible to show what you mean with a little more detail so I can copy what you did and apply it to my sheet as I am not following you 100%. I am using excel for mac 2011..

    You want me to create a new column.. combine the data together from columns B and I then apply your formula to this new column?

    I just need Column B and I not all the columns in between... and then how do I apply the format formula to your formula?
    Last edited by m106191; 12-21-2012 at 08:58 PM.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Compare 2 columns for duplicates within the columns and against the 2 columns

    Without seeing your exact data, let me know if this helps...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-21-2012
    Location
    California
    MS-Off Ver
    Excel 2011 for mac
    Posts
    4

    Re: Compare 2 columns for duplicates within the columns and against the 2 columns

    Let me give that a try and see... thank you..

  6. #6
    Registered User
    Join Date
    12-21-2012
    Location
    California
    MS-Off Ver
    Excel 2011 for mac
    Posts
    4

    Re: Compare 2 columns for duplicates within the columns and against the 2 columns

    worked perfect.. simple fix.. thank you!

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Compare 2 columns for duplicates within the columns and against the 2 columns

    You are very welcome and thanks for the feedback

+ 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