+ Reply to Thread
Results 1 to 14 of 14

Using conditional formatting to highlight multiple duplicates

  1. #1
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Using conditional formatting to highlight multiple duplicates

    Hi,

    I am trying to find a way of highlighting multiple duplicate entries in a row of data. I inititally used conditional formatting to highlight duplicates but the problem was I only wanted to highlight duplicate entries which have been entered 3 or more times. The following example sheet should illustrate this more clearly.

    As shown in the sheet code A26 would be highlighted red as it occures 5 times. Code B7 ideally would be highlighted blue as it occurs 3 times but is a different code, although it seems that it may not be possible to do this.

    Hopefully somebody can help me out!
    Attached Files Attached Files

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using conditional formatting to highlight multiple duplicates

    Try this

    Condition 1 formula
    Please Login or Register  to view this content.
    Condition 2 formula
    Please Login or Register  to view this content.
    Condition 3 formula
    Please Login or Register  to view this content.

    See the attached worksheet for the proof

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Using conditional formatting to highlight multiple duplicates

    Thanks a lot that works great...

    Although I have one more slight problem, the codes that I gave will not always be the same. Basically the codes could be any ones from a list of say 15, and I need to flag the duplicates of whichever ones happen to appear on a given day.

    I have included another example sheet, the codes could be any from those in column O and will always differ. so instead of condition one code being:

    Please Login or Register  to view this content.
    can "C1" instead reference the list in column '0' rather than a specific code.
    Attached Files Attached Files

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using conditional formatting to highlight multiple duplicates

    hmmm..........

    I'll give it a try, but cross your fingers for the formula cavalry ... to arrive...

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using conditional formatting to highlight multiple duplicates

    The problem we have here is that 2003 only allows 3 conditions in Conditional formatting.

    2007 can handle the 13 that you need by using the formulae
    Please Login or Register  to view this content.


    Where your lookup data is in $O$14:$O$26

    However 2003 will only take the first 3

    There are ways to overcome this limit using VBa but they will be quite complicated in this case.


    I have attached 2 workbooks, one in 2007
    and the same one saved as 2003 to let you see what happens

    Change the Values in row 3 to test.

    Having said that most people get quite visually confused when the are more than 3 colours to evaluate.
    It might be better all round to try some other method to highlight your problem.

    Hope this clears things a little.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Using conditional formatting to highlight multiple duplicates

    Thanks a lot for your help, I see what you mean about excel 2003

    When I am using this file I don't think that the codes in row 3 will ever extend beyond column M, which means there can only ever be 4 sets of codes which occur more than three times so I suppose that may help me out a bit.

    Maybe I should look at it so that the colour is designated by the count rather than the type of code. For example a count of 4 of the same occurance of any code would be red, 3 would be green etc etc. Do you think that would be possible? or any less complicated?

    Thanks!
    Last edited by JONNY981; 06-28-2010 at 03:26 AM.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using conditional formatting to highlight multiple duplicates

    Would you be interested in a macro?

  8. #8
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Using conditional formatting to highlight multiple duplicates

    A macro would be fine! Although it would have to be one that is run on cell entry to avoid having to click a button or something all the time...

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using conditional formatting to highlight multiple duplicates

    Hi Jonny,

    Try this sheet and see where we go from here.

    Select any code from the Drop-Down Lists in B3:Z3

    The code only works in row 3 at the moment, until I know a bit more about your sheet structure.

    I have added a Lookup sheet to handle the Drop-Downs via a named range, this can be made dynamic later, and the code adjusted to accomodate this.

    You might also find the sheet Palettes handy when changing the colours in the code.

    This code effectively gives you up to 56 conditional formats with 2003 on fonts alone.
    I'll let you workout the number of conditions you can have by combining font, itallic,bold, size, etc, then add background .........

    At the moment it handles 13 on your code list.

    The colours become a bit visually confusing I think you will agree.

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Using conditional formatting to highlight multiple duplicates

    Thanks a lot, that looks good!

    I have to say that I dont entirely understand the code, so I was wondering is there any easy way that it can be adjusted so that rather than changing colour depending on fail code, the colour changes depending on the quantity of occurance of each code?

    Im not sure which way to go about highlighting the cells yet so I want to look at both ways and then decide!

    Thanks.

  11. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using conditional formatting to highlight multiple duplicates

    Almost anything is possible using VBa!

    We just need to know the rules to apply.

    Let's know what you decide.

  12. #12
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Using conditional formatting to highlight multiple duplicates

    I think that looking at it a bit further I would be better to have it set up so that the codes are highlighted with a colour according to how many times they occur. I have changed the sheet slightly to include three rows and try and show what I am trying to do.

    I'll try to make this the last complicated question!!

    Thanks.
    Attached Files Attached Files

  13. #13
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Using conditional formatting to highlight multiple duplicates

    Hi Johnny you can do what you are after in 2003 using conditional formatting.

    1/. First format all text in your table green as standard,

    Then you only have three conditions left.

    Please Login or Register  to view this content.

    I have updated the attached file to suit and explain

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-05-2009
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Using conditional formatting to highlight multiple duplicates

    Thats great, thanks a lot!!

+ 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