+ Reply to Thread
Results 1 to 16 of 16

Conditional formatting duplicate values in multiple columns

  1. #1
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Conditional formatting duplicate values in multiple columns

    Hi all,

    I am trying to conditional format duplicate values in two columns so at the moment I'm doing =COUNTIF($D:$D,$D1)>1 in the conditional formatting formula box.

    This basically formats anythign that occurs more than once in that column.

    Data:

    Column C. Column D:

    11112 F111
    11113 F112
    11113 F141
    11114 F141
    11114
    11115 F999
    11116 F111

    So basically column C is the reference number to a case and column D is another reference to a group.

    A lot of the records only have column D filled for the top record instead of repeating it etc so how can I group them together?

    So conditional formatting that would highlight 11114 - F141 but also 11114 with empty D column because it is of the same case.

    Hope thats clear haha

    Thank you!

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting duplicate values in multiple columns

    Try these
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Apply to C and D

  3. #3
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    Hi,

    That seems to highlight the duplicate column C cells. The way I need it if possible is,

    If Column D is a DUPLICATE highlight row and also highlight the rows beneath it if the COLUMN C value is the same as the Duplicated one.

    Hope that makes sense, if not I can upload a sample spreadsheet if it makes it clearer.

    Thanks for the reply

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting duplicate values in multiple columns

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and apply to C and D

  5. #5
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    Hi thanks again for the reply,

    I might not be the best at explaining this.

    I have attached a sample spreadsheet which has the duplicates highlighted with different colour and separated the different cases with a bottom border so you are able to see the data more clearly and how they are grouped together.

    That previous formula did work but the opposite way.

    So as you can see from the spreadsheet there are sometimes multiple case references because they have more than one person in the family on that specific case. However the family reference is only recorded on the first row of the case reference.

    Therefore instead of just the first row being highlighted that has the family reference value, the ones below it need to be highlighted because it is of the same case reference.

    Thank you so much for helping, I think you could have cracked it first go if I wasn't so bad at explaining!

    Cheers,
    Attached Files Attached Files

  6. #6
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting duplicate values in multiple columns

    Hi
    try
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    see the file excelforum.xlsx

  7. #7
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    Hi,

    Thats is nearly there however it is still highlighting the rows if the Case ref column is the same even if the family ref is not a duplicate.

    It should only highlight the row if family ref is a duplicate and then highlight the rows below it if the case ref is the same

    I've attached the spreadsheet outlining which section it is.

    Thanks again for your help!
    Attached Files Attached Files

  8. #8
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting duplicate values in multiple columns

    One more try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    You're so close! haha

    It is now highlighting the blank rows correctly but not highlighting the row with the family reference. so it only now needs to highlight that row

    Thank you for helping

    EDIT: Wait I may have been doing it wrong, i think its working!
    Last edited by PowerZ; 01-07-2016 at 12:10 PM.

  10. #10
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    Hmmm still not working.

    Attached the spreadsheet with the formula.

    Left side is how it should highlight and the conditional formatting is not matching up.

    Not sure what to do.

    Thanks for your help.
    Attached Files Attached Files

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,554

    Re: Conditional formatting duplicate values in multiple columns

    It would seem that you would like to highlight all of the records that belong to the same family. That would be possible using your original conditional formatting rule, with the exception of changing $D1 to $D2, IF all of the values for the family reference column were filled in. You can populate column D with a few steps.
    1. Select C2, the Case Reference column, and press Ctrl + down arrow.
    2. Press the right arrow.
    3. Press and hold Ctrl + Shift, then press the up arrow key repeatedly until you reach the top of column D.
    4. Select Find & Select from the Home tab.
    5. Select Go To Special.
    6. Select Blanks.
    7. Press = then up arrow then enter.
    All of your Family Reference values should now be filled in. The one possible issue that I found was with rows 23 and 24.
    Here is a copy of your file with the values filled in using the steps described above and applying your original conditional formatting with the one change:
    Copy of excelforum (2).xlsx
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  12. #12
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting duplicate values in multiple columns

    See the file excelforum (3).xlsx with my suggestion
    and answer my questions

  13. #13
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    JeteMC: Yeah you understand what I am trying to achieve but unfortunately the spreadsheet cant like you said the rest of the family reference cell filled for complicated reasons.

    José I have attached the file with the correct true/false with explanations on why.

    Unfortunately the reasons why the family reference are not populated all the way down is for other reasons and unfortunately that cannot change. Only the first cell of the case reference has the family reference and the rest below only have the same case reference.

    Hopefully that spreadsheet clears it up for you,

    Thanks for all your help guys.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    Sorry please see this one attached

    I have separated the different cases with dark bottom border so you can see the separate cases easier.
    Attached Files Attached Files

  15. #15
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Conditional formatting duplicate values in multiple columns

    Solution:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file Book1 (1).xlsx

  16. #16
    Registered User
    Join Date
    10-24-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Conditional formatting duplicate values in multiple columns

    Quote Originally Posted by José Augusto View Post
    Solution:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file Attachment 439168
    That work's perfectly!!!!! Thank you so much!!

+ 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. Conditional Formatting and Duplicate Values
    By bgarner10 in forum Excel General
    Replies: 2
    Last Post: 01-01-2016, 09:18 PM
  2. [SOLVED] Conditional Formatting Duplicate Value with 2 columns
    By raffi123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-21-2014, 04:12 PM
  3. [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
  4. [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
  5. Conditional Formatting duplicate data in columns
    By DuckMan72 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-13-2013, 05:19 PM
  6. [SOLVED] Help with Conditional Formatting Duplicate Values
    By alcharbonneau in forum Excel General
    Replies: 6
    Last Post: 02-26-2013, 09:09 PM
  7. Conditional formatting for duplicate values
    By kris26 in forum Excel - New Users/Basics
    Replies: 12
    Last Post: 03-21-2012, 06:51 AM

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