+ Reply to Thread
Results 1 to 8 of 8

Color dupe rows but differentiate

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,990

    Color dupe rows but differentiate

    This is a cross between a programming issue and a formula issue. The attached workbook has a macro that applies a conditional formatting formula to the used range. That conditional formatting applies a shading (gray) to duplicate rows, ideally to make it easier to see the duplicates. But there's a problem; I can have multiple sets of duplicate rows immediately following each other. See the "A Child is Born" section in the "As the Macro does it" tab to see this in action. The net effect is that the shading doesn't differentiate between adjacent sets of duplicates. On the "As I'd like it" tab I've put what I'd like to see. I don't know if this can be achieved with a different conditional formatting formula, or if changes to the macro (other than formula) need to be made. I'd appreciate any help I can get with this.

    Thanks,
    John
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Color dupe rows but differentiate

    Should the colors blue and grey be used alternatively throughout the file? Or is there a condition for each color?

    Also, why are rows 6-9, 19-20 not marked in any color?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,990

    Re: Color dupe rows but differentiate

    Arlu,

    The rows weren't colored because I colored that sheet by hand, and I'm not as good as a macro, so I just missed them.

    The basic idea is to highlight what are dupes, but not have them all the same color, so I thought alternating colors would work well. But if you have a better idea I'm wide open to it.

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,990

    Re: Color dupe rows but differentiate

    Bumping this up because I'm still in need of a solution.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Color dupe rows but differentiate

    Try this
    Please Login or Register  to view this content.
    It alternates the colors throughout the dataset.

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,990

    Re: Color dupe rows but differentiate

    Arlette,
    Very close, but not quite. See the attachment. I altered your macro to focus on column G instead of B, but didn't change anything else (I think). Notice on lines 15, 22, and 30 that no color is applied, and they should be.
    Attached Files Attached Files

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Color dupe rows but differentiate

    You missed out changing one B to G. Updated code
    Please Login or Register  to view this content.
    The B(now G) you missed out has been highlighted.

  8. #8
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,990

    Re: Color dupe rows but differentiate

    Arlette,

    I should have figured it was my mistake. Thanks for straightening me out and providing this code. I'll make sure to make good use of it.

    Thanks,
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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