+ Reply to Thread
Results 1 to 8 of 8

Highlight duplicates - two sheets - based on two cell values

  1. #1
    Registered User
    Join Date
    02-17-2021
    Location
    Helsinki, Finland
    MS-Off Ver
    365
    Posts
    31

    Highlight duplicates - two sheets - based on two cell values

    I have an excel which has 2 sheets. Need to highlight (the whole row) on the Target Group-sheet, information (criteria:street address, firsts & last name match) that is on "contacted-sheet".
    As there is no key identifier, I thought if Street Address and Names could be criterias to be used for matching?

    As a user I want to see on my marketing campaign target group, which of these persons have contacted.

    I tired conditional formatting but for some reason it does not work (=Countif). Would appreciate any help.
    Sample file enclosed.
    Thanks!
    Attached Files Attached Files
    Last edited by Tsinos; 06-09-2022 at 02:24 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Highlight duplicates - two sheets - based on two cell values

    The whole trick is to make it evaluate to a TRUE scenario... in this case you are asking IF there is at least 1 record on contacted.

    We can do this by doing a count where the values are a match

    Conditional formatting would be this as the FORMULA RULE where you apply it to A2:G8, if you start with row 1 in the applied to range you need to make sure the references are also row 1... My example I am starting row 2 so be aware
    =COUNTIFS('Have contacted'!$C:$C,$D2,'Have contacted'!$A:$A,$B2,'Have contacted'!$B:$B,$C2)>0

    You can test the formula by removing the logic evaluation >0 and simply get the count of records that are a match.

    IN I2 on your Target Group put the formula in

    =COUNTIFS('Have contacted'!$C:$C,$D2,'Have contacted'!$A:$A,$B2,'Have contacted'!$B:$B,$C2)

    and drag it down, you will find where there is 1 or more... in this example you only ever have 1 instance of an exact match thus row 4 becomes a 1 or is highlighted if rule is applied
    -If you think you are done, Start over - ELeGault

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Highlight duplicates - two sheets - based on two cell values

    Using Power Query and an exact match for First Name, Last Name and Street Address and a Left Join

    Please Login or Register  to view this content.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Highlight duplicates - two sheets - based on two cell values

    G2=A2&" "&B2

    Same for the second sheet.

    H2 =IFERROR(IF(MATCH(G2,'Target group'!$H$1:$H$8,0)>0,"contacted"),"not contacted")

    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    02-17-2021
    Location
    Helsinki, Finland
    MS-Off Ver
    365
    Posts
    31

    Re: Highlight duplicates - two sheets - based on two cell values

    Thank you so much. This works. Now my challenge is that Excel frozes as more than 55.000 rows on it. But got the rows highlighted...

  6. #6
    Registered User
    Join Date
    02-17-2021
    Location
    Helsinki, Finland
    MS-Off Ver
    365
    Posts
    31

    Re: Highlight duplicates - two sheets - based on two cell values

    That is definitely something I need to take a look into. Thanks for pointing me in that direction! And thanks for your solution as well!

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Highlight duplicates - two sheets - based on two cell values

    You got answers from several forummembers.

    Please add in the reply to whom you are replying.

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Highlight duplicates - two sheets - based on two cell values

    Glad I could help.

    Thanks for marking the question solved.

    You can add reputation by clicking on the star * add reputation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to highlight duplicates across various sheets
    By locksyness in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2021, 10:44 AM
  2. Highlight duplicates across 2 sheets
    By mhope in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-29-2020, 11:52 AM
  3. VBA to highlight duplicates over 2 sheets
    By Spoonman667 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-20-2019, 11:52 AM
  4. Replies: 1
    Last Post: 02-06-2019, 09:58 AM
  5. How to highlight duplicates in google sheets?
    By ImranBhatti in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-16-2017, 11:37 AM
  6. Compare on 2 sheets based on values in a 3rd sheet and highlight mismatches
    By Sirilias in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2016, 10:21 AM
  7. Replies: 1
    Last Post: 09-28-2011, 07:42 PM

Tags for this Thread

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