+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting based on similar rows

  1. #1
    Registered User
    Join Date
    07-08-2018
    Location
    Chicago, Illinois
    MS-Off Ver
    2017
    Posts
    4

    Conditional Formatting based on similar rows

    Hello,

    Please note that I have attached the excel file because describing the problem is a bit tough. I think seeing the file may help clarify things.

    I am trying to do something that requires somewhat, (at least for me), complex logic using simple functions in Excel. I have 2 tables, Group 1, and Group 2. Each Group has a list of people that are listed out more than once. Each person has an ID, a Number 1 side, and a Number 2 side. I also have a simple one column table called 'Key' that just contains the values I am searching for.

    So, what I am trying to do is highlight the entire row of a person who has one of their numbers, either number 1 or number 2, in red, and somebody that has all of their numbers matching with any value in the 'Key' table to be highlighted in green.

    I have attached my Excel file to make this easier to follow.

    I am doing this on a small scale, and I have had some success using a series of IF statements with embedded VLOOKUPS, and some more success with using IFERROR's with embedded VLOOKUP's, but none of my solutions really work tooo well.

    Does anyone have any advice or a solution?
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Conditional Formatting based on similar rows

    Will any of the names have duplicate numbers in columns D:E?
    Dave

  3. #3
    Registered User
    Join Date
    07-08-2018
    Location
    Chicago, Illinois
    MS-Off Ver
    2017
    Posts
    4
    Quote Originally Posted by FlameRetired View Post
    Will any of the names have duplicate numbers in columns D:E?
    Hi Flame. No there should not be any duplicates across rows. So, on one line a person won’t have a number in both ‘Number 1’ column and in ‘Number 2’ column. The numbers between Number 1 and Number 2 should also be different for each person. However, if a person has multiple ‘Number 1’ columns, then it is possible there will be a duplicate value. But a duplicate will never happen across columns D:E

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

    Re: Conditional Formatting based on similar rows

    This proposal employs two helper columns (F:G) which may be moved and/or hidden for aesthetic purposes.
    Column F is populated using: =IF(B4="","",ISNUMBER(MATCH(SUM(D4:E4),C$24:C$38,0)))
    Column G is populated using: =IF(B4="","",OR(COUNTIFS(F$4:F$21,TRUE,B$4:B$21,B4)=COUNTIFS(B$4:B$21,B4),COUNTIFS(F$4:F$21,FALSE,B$4:B$21,B4)=COUNTIFS(B$4:B$21,B4)))
    The formulas that conditionally format the cells are as follows:
    Red: =AND($F4=TRUE,$G4=FALSE)
    Green: =AND($F4=TRUE,$G4=TRUE)
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Conditional formatting based on rows AND columns
    By HelenaF in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-04-2018, 03:52 AM
  2. Conditional formatting or something similar
    By CTGCWIQC in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2014, 06:22 PM
  3. [SOLVED] Conditional Formatting Rows Based on Dates
    By vinceancona in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2013, 11:53 AM
  4. Replies: 7
    Last Post: 07-07-2009, 08:32 AM
  5. Deleting rows based on Conditional Formatting
    By Yobari in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-11-2009, 01:46 PM
  6. Conditional formatting similar to shading alternating rows
    By Conan Kelly in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-22-2006, 06:20 PM
  7. How do I use conditional formatting on all rows based on data
    By RYD@wolpofflaw in forum Excel General
    Replies: 2
    Last Post: 11-10-2005, 01:35 PM

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