+ Reply to Thread
Results 1 to 9 of 9

Conditional formatting for duplication - Two columns are involved

  1. #1
    Registered User
    Join Date
    04-27-2017
    Location
    New York
    MS-Off Ver
    MS 365 v2211
    Posts
    85

    Conditional formatting for duplication - Two columns are involved

    Hello,

    I'm trying to apply a conditional format to a spreadsheet, but it requires comparing two columns.

    Here are the facts: Column A includes employee names. Column G includes dates on which they worked. If a date is listed twice or more for one employee, that represents a duplication error.

    For example, January 1 is listed twice for John, but only once for Yolanda. I want to highlight both of John's January 1 rows, but not Yolanda's.

    Currently, I only know how to highlight duplicates in column G, but that won't suffice, since duplicates are allowed within that column (just not for the same worker).

    Sample spreadsheet is attached.

    Thank you,
    Rook
    Attached Files Attached Files
    Last edited by RookA1; 10-30-2017 at 09:21 AM. Reason: Solved

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional formatting for duplication - Two columns are involved

    Highlight A2:H40 > Conditional Formatting > New Rule > Use a formula

    =COUNTIFS($A:$A,$A2,$G:$G,$G2)>1

    Format: Fill color of your choice > OK > OK

  3. #3
    Registered User
    Join Date
    04-27-2017
    Location
    New York
    MS-Off Ver
    MS 365 v2211
    Posts
    85

    Re: Conditional formatting for duplication - Two columns are involved

    Thank you for the instant reply, 63falcondude. The formula worked!

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional formatting for duplication - Two columns are involved

    You're welcome. Thanks for the rep!

  5. #5
    Registered User
    Join Date
    04-27-2017
    Location
    New York
    MS-Off Ver
    MS 365 v2211
    Posts
    85

    Re: Conditional formatting for duplication - Two columns are involved

    One more question: Any tips for applying this to larger spreadsheets? Excel freezes when the formula is applied to the original sheet of 127,000 rows.

    Thank you,

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional formatting for duplication - Two columns are involved

    Try reducing the size of the referenced range in the formula.

    That is, highlight A2:H127000 and use this formula:

    =COUNTIFS($A$2:$A$127000,$A2,$G$2:$G$127000,$G2)>1

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional formatting for duplication - Two columns are involved

    That being said, why do you want to apply Conditional Formatting to over 100,000 rows of data? Surely you aren't manually checking all of these rows.

    If you want to remove the duplicated values, there are better/easier ways of achieving this.

  8. #8
    Registered User
    Join Date
    04-27-2017
    Location
    New York
    MS-Off Ver
    MS 365 v2211
    Posts
    85

    Re: Conditional formatting for duplication - Two columns are involved

    Your guess is right. I'm trying to highlight all instances of duplication, but not necessarily remove them.

    Still 'Not Responding' - but I'm not sure if the limiting factor is my hardware or the demands of the formula. Narrowing the data down to each month would net 12 sheets of ~10,580 rows. Maybe that will help.

    Ideas for a better way would be greatly appreciated.

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional formatting for duplication - Two columns are involved

    You sent me a PM asking for a better way to conditionally format your data.

    A few things:

    1) Please keep all communications within the public forums and not through private messages.
    2) I said that there are better/easier ways to remove duplicate values.
    3) If I knew a "better" way of Conditionally Formatting your data, I would have suggested that.

+ 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. Formatting and Duplication Questions
    By senjoim in forum Excel General
    Replies: 0
    Last Post: 02-21-2015, 03:26 PM
  2. Image not loading (conditional formatting involved)
    By mrbusto71 in forum Excel General
    Replies: 0
    Last Post: 02-12-2015, 03:35 PM
  3. conditional formatting when many columns are involved
    By puremajik in forum Excel General
    Replies: 4
    Last Post: 12-09-2014, 10:20 PM
  4. Conditional Formatting with multiple sheets involved
    By AMSBenji in forum Excel General
    Replies: 36
    Last Post: 05-01-2013, 10:08 PM
  5. Conditional formatting with a " - -" involved
    By davidingilbert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-24-2013, 05:47 PM
  6. Conditional Formatting with multiple sheets involved
    By AMSBenji in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-15-2013, 05:38 PM
  7. Duplication in rows condional formatting
    By MAXIM in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 06-11-2010, 11:53 AM

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