I need to highlight duplicates between two columns, but not duplicates within the same column.

Anonymous
2024-03-13T20:42:04+00:00

I need to highlight duplicates between two columns, but not duplicates within the same column.

I've tried all sorts of conditional formatting with various formulas but nothing works.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

4 additional answers

Sort by: Most helpful
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2024-03-13T21:37:44+00:00

    Let's say your data are in A2:A100 and in C2:C50.

    Select the first range A2:A100.

    A2 should be the active cell in the selection.

    On the Home tab of the ribbon, click Conditional Formatting > New Rule...
    Select 'Use a formula to determine which cells to format'.
    Enter the formula

    =COUNTIF($C$2:$C$50, $A2)

    Click Format...
    Activate the Fill tab.
    Select a highlight color.
    Click OK, then click OK again.

    Next, select the other range C2:C50.

    C2 should be the active cell in the selection.

    Follow the same steps as for the first range, but with the formula

    =COUNTIF($A$2:$A$100, $C2)

    0 comments No comments
  2. Anonymous
    2024-03-14T16:34:15+00:00

    Hi Hans,

    Thank you for answering so quickly. I appreciate it.

    The formulas worked but only on one column.

    So the columns are A and I that are being compared.

    Column I has several names that are duplicated, but I only want one of them to highlight.

    Column A doesn't have any duplicates.

    Column A did highlight the names I needed, but nothing highlighted at all in column I.

    I'd attach the file but I'm not seeing where that's an option.

    Any suggestions?

    0 comments No comments
  3. Anonymous
    2024-03-14T17:18:37+00:00

    THANK YOU SOOOO MUCH!!

    0 comments No comments
  4. Anonymous
    2024-03-14T17:31:47+00:00

    You are welcome:) You may also give feedback on it.

    0 comments No comments