+ Reply to Thread
Results 1 to 3 of 3

Conditional Formatting Duplicate Value with 2 columns

  1. #1
    Registered User
    Join Date
    06-09-2013
    Location
    lebanon
    MS-Off Ver
    Excel 2007
    Posts
    95

    Conditional Formatting Duplicate Value with 2 columns

    hello i have an excel sheet where i would like to highlight duplicate value's, but not just one column, but rather to highlight duplicate value where 2 columns have exactly the same matching value,

    the conditional formatting would operate only when 2 cells next to each other are duplicated else where, and it would highlight the 2 cells
    Last edited by raffi123; 09-21-2014 at 03:01 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Conditional Formatting Duplicate Value with 2 columns

    You can do this with a combination of conditional formatting and a user defined function.

    User defined function
    Please Login or Register  to view this content.
    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    Now set up the conditional formatting. I've assumed columns A and B are used and rows 1 to 7 are used.

    Create a new rule and specify that it is determined with a formula.

    Use the formula

    =MatchAndDuplicate($A$1:$B$7,$A1:$B1)>1

    and apply this to

    =$A$1:$B$7


    Remember to save the workbook as a macro enabled workbook .xlsm

    An example is attached.
    Attached Files Attached Files
    Martin

  3. #3
    Registered User
    Join Date
    06-09-2013
    Location
    lebanon
    MS-Off Ver
    Excel 2007
    Posts
    95

    Re: Conditional Formatting Duplicate Value with 2 columns

    thx it worked this will help at work

+ 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] Conditional Formatting: Duplicate rows based on multiple columns.
    By Old4xford in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2014, 11:25 AM
  2. [SOLVED] match duplicate pair value ONLY between 2 columns using conditional formatting
    By yogi_himalayan in forum Excel General
    Replies: 4
    Last Post: 04-04-2014, 04:54 PM
  3. Conditional Formatting duplicate data in columns
    By DuckMan72 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-13-2013, 05:19 PM
  4. [SOLVED] Conditional formatting of duplicate rows (not duplicate cells)
    By ExcelStefan in forum Excel General
    Replies: 2
    Last Post: 06-19-2012, 06:09 AM
  5. duplicate conditional formatting
    By detlion1643 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2009, 01:11 PM

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