+ Reply to Thread
Results 1 to 5 of 5

highlight duplicates over a certain length

Hybrid View

  1. #1
    Registered User
    Join Date
    06-19-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    7

    highlight duplicates over a certain length

    Hi,

    I'm trying to highlight duplicates over a certain length.. I know you can remove duplicates through the conditional formatting menu but I need to enter a formula that limits it to duplicates that have over 12 characters as duplicates less than this character length i do not want to highlight.

    I believe it should be something along the lines of len(A1) > 12 and is duplicate then apply chosen highlighting.

    I am not sure how to code the 'and is duplicate' though. Any help would be appreciated.

    Note - I did try to filter the column first by character length and then apply the formatting but this unsurprisingly doesn't work.

    Thanks,

    Rob

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,874

    Re: highlight duplicates over a certain length

    Try

    =IF(AND(LEN(A2)>12,COUNTIF($A$1:A2,A2)>1),"D","")

    Filter on "D" for duplicates with length > 12

  3. #3
    Registered User
    Join Date
    06-19-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    7

    Re: highlight duplicates over a certain length

    Hi thanks for the response.. I have just tried to test the provided formula by pasting into the 'new rule formula window' formatted with orange highlighting but no highlighting has been applied.

    Thanks,

    Rob.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,874

    Re: highlight duplicates over a certain length

    The formula was intended to put "D" in a column where duplicates existed: you can then filter on the column rather than use CF.

    Try in CF

    =AND(LEN($A1)>12,COUNTIF($A$1:$A$1000,$A1)>1)

  5. #5
    Registered User
    Join Date
    06-19-2016
    Location
    London
    MS-Off Ver
    2016
    Posts
    7

    Re: highlight duplicates over a certain length

    Hi John,

    Thanks very much.. that works. I have just pasted it in for now, but will look into the combination of IF/AND to understand it more.

    Thanks again.

    Rob.

+ 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] Highlight Duplicates
    By markusvirus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-29-2015, 09:42 AM
  2. How to Highlight Duplicates
    By carlton7372 in forum Excel General
    Replies: 13
    Last Post: 09-15-2015, 03:50 PM
  3. Data Validation - Number, Length and no Duplicates
    By JDobbsy1987 in forum Excel General
    Replies: 2
    Last Post: 08-27-2015, 07:38 AM
  4. Macro button to collect data from 2 columns of unknown length & duplicates removal
    By regresss in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2015, 05:30 PM
  5. Highlight duplicates if col A and B are the same but not col C
    By Hond70 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2011, 05:01 AM
  6. Compare two columns (different length) and pt duplicates in new column
    By dzap79 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-14-2009, 09:03 AM
  7. Macro to check for duplicates and highlight duplicates
    By obc1126 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-23-2008, 09:55 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