+ Reply to Thread
Results 1 to 4 of 4

Conditional formatting - highlight unique/duplicate values

Hybrid View

lastnn30 Conditional formatting -... 12-01-2021, 01:31 PM
etaf Re: Conditional formatting -... 12-01-2021, 01:40 PM
Glenn Kennedy Re: Conditional formatting -... 12-01-2021, 01:50 PM
lastnn30 Re: Conditional formatting -... 12-01-2021, 02:00 PM
  1. #1
    Forum Contributor
    Join Date
    04-09-2013
    Location
    City, World
    MS-Off Ver
    Office 365
    Posts
    248

    Conditional formatting - highlight unique/duplicate values

    Hi
    I created 2 rules to highlight duplicate and unique value respectively using the following formulas:

    For duplicated
    =COUNTIF($A$2:$A$20,A2)>1
    for unique
    =COUNTIF($A$2:$A$20,A2)=1

    I also selected a cell and the inserted Data Validation list with the following values

    - Duplicate
    - Unique

    Can I like this cell to the conditional formatting rules, so if user select Duplicate then it will execute the first formula and if the user selected unique then it will execute the second formula?
    Please see attached file for more info. Thank you very much
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,124

    Re: Conditional formatting - highlight unique/duplicate values

    use and AND

    =AND ($F$2="Duplicate" ,COUNTIF($A$2:$A$20,A2) > 1)
    =AND ($F$2="Unique" ,COUNTIF($A$2:$A$20,A2)=1))
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Conditional formatting - highlight unique/duplicate values

    One way:

    =IF($F$2="","",IF($F$2="unique",COUNTIF($A$2:$A$20,A2)=1,COUNTIF($A$2:$A$20,A2)>1))

    see sheet.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Contributor
    Join Date
    04-09-2013
    Location
    City, World
    MS-Off Ver
    Office 365
    Posts
    248

    Re: Conditional formatting - highlight unique/duplicate values

    Very smart suggestions. Thank you very much both.

+ 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. Replies: 5
    Last Post: 10-12-2020, 05:51 PM
  2. [SOLVED] Conditional formatting to find and highlight duplicate number
    By rizmomin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-02-2018, 10:15 PM
  3. Replies: 2
    Last Post: 02-14-2017, 04:00 PM
  4. [SOLVED] Conditional Formatting highlight duplicate values IF cell doesn't start with "XX"
    By deneh in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2015, 04:44 AM
  5. Replies: 1
    Last Post: 08-18-2010, 02:00 PM
  6. Conditional formatting to highlight duplicate entries
    By legendkiller420 in forum Excel General
    Replies: 1
    Last Post: 07-12-2010, 11:36 AM
  7. Conditional Formatting- Highlight Duplicate Values
    By Christopher_1 in forum Excel General
    Replies: 4
    Last Post: 04-21-2010, 11:02 AM

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