+ Reply to Thread
Results 1 to 6 of 6

Matching duplicates based on multiple criteria, conditional formatting?

  1. #1
    Registered User
    Join Date
    12-20-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Matching duplicates based on multiple criteria, conditional formatting?

    Hi all,

    I have the below sample data set:
    ID Address Date
    123 45 Mall way 12/19/2013
    123 45 Mall way 12/19/2013
    112 22 Viper st 12/19/2013
    112 22 Viper st 12/19/2013
    112 22 Viper st 12/20/2013
    112 22 Viper st 12/18/2013
    111 12 Jog ct. 12/11/2013
    113 15 Key blvd. 12/10/2013

    I want to conditionally format duplicate rows of data based on ID, Address, and Date - but the date can be plus or minus a day or two.

    Is it possible?

    Thanks in advance.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Matching duplicates based on multiple criteria, conditional formatting?

    Highlight the data in columns A, B and C, starting from A3, then click on Conditional Formatting | New Rule | Use a Formula ...

    Enter this formula in the box:

    =AND($A2=$A3,$B2=$B3,ABS($C2-$C3)<3)

    Click the Format button, select the Fill tab, then choose your colour and OK your way out. Excel will automatically adjust those cell references to suit the selected data. This will highlight the duplicated rows, but not the first of the duplicates.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-20-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Matching duplicates based on multiple criteria, conditional formatting?

    Thank you Pete_UK.

    It sorta worked. It doesn't highlight all of the duplicates, just some. In a few rows I have 4 duplicates, and only two were higlighted. Maybe the formula is a little off because the data can have up to 20 duplicates?

    I appreciate your feedback!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Matching duplicates based on multiple criteria, conditional formatting?

    Could it be that your dates are really date-times with only the dates showing?

    Or could you have leading and/or trailing spaces or multiple spaces in the address?

    Attach a sample workbook showing more variations than in your first post.

    Pete

  5. #5
    Registered User
    Join Date
    12-20-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Matching duplicates based on multiple criteria, conditional formatting?

    Not sure if I attached one correctly. Excel forum sample.xlsx

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Matching duplicates based on multiple criteria, conditional formatting?

    You have some spaces in your addresses. Highlight the data from A2 to E28, click on Conditional Formatting | New Rule | Use a formula, then enter this formula in the box:

    =AND($A1=$A2,TRIM($C1)=TRIM($C2),ABS($E1-$E2)<3)

    then click on the Format button as before, select Fill tab and choose your colour and OK your way out.

    Hope this helps.

    Pete

+ 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. [SOLVED] Use Conditional Formatting based on multiple criteria
    By jdmet135 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-25-2012, 09:11 AM
  2. [SOLVED] How to use conditional formatting based on multiple criteria
    By Dena in forum Excel General
    Replies: 3
    Last Post: 10-15-2012, 04:57 PM
  3. Replies: 2
    Last Post: 08-27-2011, 03:05 PM
  4. Replies: 4
    Last Post: 01-20-2011, 01:31 PM
  5. [SOLVED] Conditional Formatting based on multiple criteria
    By twlove@ontuet.com in forum Excel General
    Replies: 2
    Last Post: 08-03-2006, 04:45 PM

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