+ Reply to Thread
Results 1 to 5 of 5

Flag Duplicate Cells

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    Syracuse, Kansas
    MS-Off Ver
    Excel 2010
    Posts
    1

    Question Flag Duplicate Cells

    Hello,

    I am trying to flag duplicate values between two columns, I do not want to flag a column if it has duplicates within itself, only if it has a duplicate from another column that I specified. I've been struggling with this for a while. Here's an example -


    A B
    9 9
    12 9
    16 5
    18 18


    What's happening are the the cells in Column be are getting flagged when I use conditional formatting --> highlight cell rules --> duplicates, because technically they are duplicates. But I only want to flag cells that have a duplicate from column A and column B, not if column A or column B have duplicates within its own column.

    Any help is much appreciated !!!

    Edit: I should have specified better. Here's a better example -

    I'm going to try to attach a picture.. :
    Duplicates.png

    As you can see, it's flagging number 32 because its in column B twice, but 32 is not in column A. I do not want to flag 32, just unique duplicates between Column A and Column B.
    Last edited by MikeDavalos; 08-07-2019 at 07:06 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,935

    Re: Flag Duplicate Cells

    For column A vals found in Col B:
    Select Column A, then CF with.
    Please Login or Register  to view this content.
    You need a second (similar) formula to highlight col B vals found in Col A
    Attached Files Attached Files
    Last edited by protonLeah; 08-08-2019 at 01:45 AM.
    Ben Van Johnson

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Flag Duplicate Cells

    Ben I think you left out the test part of your countif (it will flag all counts >= 1)

    =COUNTIF($B$1:$B$4,$A1)>1
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,935

    Re: Flag Duplicate Cells

    =COUNTIF($B$1:$B$4,$A1) returns zero/False when A1 val not in B, otherwise: True
    Last edited by protonLeah; 08-08-2019 at 01:43 AM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Flag Duplicate Cells

    Quote Originally Posted by protonLeah View Post
    =COUNTIF($B$1:$B$4,$A1) returns zero/False when A1 val not in B, otherwise: True
    I stand corrected, I mis-read the Q, thought they wanted all dups flagged

+ 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] Flag if set of cells are not in ascending order
    By mgcarino14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2016, 09:01 AM
  2. "Flag" row of duplicate entries with the greatest date
    By mattmickle in forum Excel General
    Replies: 24
    Last Post: 07-01-2015, 09:48 AM
  3. [SOLVED] Flag items as void if duplicate and old.
    By gutterball in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-10-2015, 11:45 AM
  4. Macro that will flag a duplicate line.
    By HCLax in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-07-2014, 02:14 PM
  5. [SOLVED] Flag cells that are empty after 90 days
    By SpiritedAway in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-11-2013, 03:01 PM
  6. Flag if Duplicate
    By LottieCampbell in forum Excel General
    Replies: 3
    Last Post: 03-29-2012, 09:47 AM
  7. flag cells
    By M.A. in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-05-2005, 05:00 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