+ Reply to Thread
Results 1 to 9 of 9

Formula for Multiple Criteria in Conditional Formatting

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    Long Beach
    MS-Off Ver
    Excel 2007
    Posts
    14

    Formula for Multiple Criteria in Conditional Formatting

    What formula would I use with conditional formatting if I want to highlight all the cells in column B based on column A cells having duplicate data, but only if column B cells do not have duplicate data input. For example:

    A B
    Joe Smith Matched
    Joe Smith Pending
    Mary Sue Pending
    Mary Sue Pending
    Betty H Matched
    Betty H Matched

    In this example I want column B to be highlighted for only Joe Smith since he has a "Matched" and "Pending" status.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula for Multiple Criteria in Conditional Formatting

    try..

    =COUNTIFS($A$1:$A$6,A1,$B$1:$B$6,B1)=1
    format --colour
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    08-30-2012
    Location
    Long Beach
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Formula for Multiple Criteria in Conditional Formatting

    That unfortunately did not work. It highlighted cells but not based on the criteria I need. There are about 6500 duplicated lines and each name has either "Matched" or "Pending" in the other column. I need to only select the rows that have duplicated names with a "Matched" on one row and "Pending" status on the other duplicated row.

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula for Multiple Criteria in Conditional Formatting

    Works for me..see attached.

    You'd have to adjust ranges as per your data
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-30-2012
    Location
    Long Beach
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Formula for Multiple Criteria in Conditional Formatting

    could you please explain the formula to me so I understand how it's created for future reference?

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Formula for Multiple Criteria in Conditional Formatting

    The formula calculates count of values that meet criteria in Column A as well as Column B concurrently

    Hence, a duplicate name with the same 'status' will get counted as 2. However, a duplicate name with differing status will get counted as one each and will meet the criteria (See =1 at end of formula), hence get highlighted

  7. #7
    Registered User
    Join Date
    08-30-2012
    Location
    Long Beach
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Formula for Multiple Criteria in Conditional Formatting

    Thank you again...I really appreciate your help. This saved me hours of time

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Formula for Multiple Criteria in Conditional Formatting

    @ excelheaven

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  9. #9
    Registered User
    Join Date
    01-08-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010-2013
    Posts
    26

    Re: Formula for Multiple Criteria in Conditional Formatting

    Can you explore more about format color I don't get it... I want to highlight only the duplicated names...

    Thanks...

    Quote Originally Posted by Ace_XL View Post
    try..

    =COUNTIFS($A$1:$A$6,A1,$B$1:$B$6,B1)=1
    format --colour

+ 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