Show duplicate through VBA, but exclude certain columns & rows within the selected range

  • Hello,


    This forum has also helped me a lot over the years and I hope this will be the case now.

    I know there are a lot of ways to show duplicates values in excel, but I have not seen this yet so I don't know if this is possible.
    Let's say I have a range from C5 to X70, within that range I would like to see duplicates marked red.
    But within that range there a columns and rows that need to be excluded from turning red (so duplicates are aloud in these columns & rows)
    The code should only look for doubles in columns C / E / G / I / K / M / O
    The code should ignore doubles in row 55 / 56 / 57 / 58
    So if there is a name John in column C, but also a John in column K, both John's should highlight RED.
    A John in row 56 should NOT turn RED, because this is aloud.

    I want to use this with a Worksheet_Change event in VBA, and prefer not to use conditional formatting, because there will be a lot of copy & paste happing in this sheet.

    Can anybody help me out with my problem?

    A big thanks in advance for all the help that will be offered, I really appreciate it.

    Edited once, last by xsmurf ().

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!