+ Reply to Thread
Results 1 to 8 of 8

Need to highlight entire rows when duplicate values found in two separate columns

  1. #1
    Forum Contributor
    Join Date
    04-04-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    204

    Need to highlight entire rows when duplicate values found in two separate columns

    I'm woring with another colleague on analysing a data worksheet that has over 35,000 rows and 20 columns A-T. We need to highlight contiguous rows that contain duplicate values that exist in both ColD, AND ColJ, regardless of how many duplicates they could be.
    For example:
    ColD - - - - - - - ColJ
    Oragne - - - - - Sugar
    Orange - - - - - Sugar
    Orange - - - - - Sugar
    These three contiguous rows should be highlighted in yellow because duplicates found in BOTH columns. They could be any number of contiguous rows 2-n, they are three in this example.

    Orange - - - - - Sugar
    Banana - - - - - Sugar
    Cannot highlight any of these rows despite having duplicates in one column only which is ColJ in this example, regardless of how many duplicates may exist in that column.

    Can we get some precious help with this request please?

    Much appreciated.

    T.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Need to highlight entire rows when duplicate values found in two separate columns

    Select rows 2 to the last used row and enter this Conditional Formatting formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Need to highlight entire rows when duplicate values found in two separate columns

    See next code
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Need to highlight entire rows when duplicate values found in two separate columns

    You may want to paint only used columns
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-04-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    204

    Re: Need to highlight entire rows when duplicate values found in two separate columns

    Quote Originally Posted by AlphaFrog View Post
    Select rows 2 to the last used row and enter this Conditional Formatting formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you very much AlphaFrog for that genius formula. I feel "rich" now to have such an amazing solution besides PCI's code. It did as exactly as needed.
    More than grateful.

    T.

  6. #6
    Forum Contributor
    Join Date
    04-04-2013
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    204

    Re: Need to highlight entire rows when duplicate values found in two separate columns

    Thank you very much PCI for such magic code which did as exactly as needed. You have such a valuable addition to this world.
    Merci beaucoup, plus que reconnaissant.

    T.

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Need to highlight entire rows when duplicate values found in two separate columns

    Je t'en prie, you are welcome and thank you for the Rep
    Enjoy Excel

  8. #8
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,705

    Re: Need to highlight entire rows when duplicate values found in two separate columns

    All these different languages!
    But with the Forum Rules we are in luck. They are in plain English.
    Rule #3 should be of interest to you.

    http://www.vbaexpress.com/forum/show...parate-columns
    Last edited by jolivanes; 09-29-2018 at 11:19 PM.

+ 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] How to highlight a row based on matching values from separate columns
    By MyStix01 in forum Excel General
    Replies: 2
    Last Post: 09-21-2017, 08:43 PM
  2. want to highlight duplicate values from other columns
    By brijeshr in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 12-16-2014, 03:33 AM
  3. Replies: 1
    Last Post: 11-14-2014, 07:45 PM
  4. Combine rows with duplicate values into separate columns
    By itgeekgroup in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-18-2014, 11:12 AM
  5. Highlight Entire Row If Values are in 2 Columns
    By lmarkie74 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2014, 07:32 PM
  6. Replies: 4
    Last Post: 09-18-2012, 09:06 AM
  7. Replies: 0
    Last Post: 07-22-2011, 12:11 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