Highlight a cell based on another cell compared to a range

mst3kr

New Member
Joined
Apr 15, 2013
Messages
46
Office Version
  1. 2019
  2. 2010
  3. 2007
Platform
  1. Windows
Hello all!

Need some direction on whether VBA or Conditional Formatting is the best/correct avenue for what I'm after...

I have a spreadsheet that will be tracking all of the start-to-finish checkpoints in different phases for tasks that need to be completed for a customer, their new product, and when that product is due.

I need to highlight the customer name
Red if, based on the due date, any of the check dates for that customer will be 2 days or less than the due date.
Yellow if any of the check dates are within 4 days of the due date.
Green if all of the checkpoint dates are greater than the production date by at least 2 days.

Below is an example of what I'm after...

CustomerDue
Initial Data Rcvd​
Check 1Check 2Check 3Check 1Check 2Check 3Check 1Check 2Check 3Check 4Check 5Check 1Check 2Check 3Check 4
Magnificent Mike's3/1/22
2/1/22​
2/1/222/2/222/3/222/10/222/12/222/15/222/16/222/16/222/16/222/20/222/21/222/23/222/25/222/25/222/25/22
Brainy Brian's4/15/223/1/223/2/223/2/223/8/223/9/223/10/223/10/223/15/223/16/223/17/223/22/224/2/224/3/224/6/224/6/224/10/22
Jazzy Joe's2/20/22
2/10/22​
2/11/222/11/222/11/222/12/222/13/222/15/222/18/222/20/222/23/222/26/222/26/222/28/222/28/223/2/22
3/20/22​

Magnificent Mike's would be highlighted Yellow since the final check date is 2/25 and within 4 days of the due date. Brainy Brian's would be highlighted Green, and Jazzy Joe's would be Red as we are way outside the due date. I'm already conditional formatting the individual checkpoints R/Y/G based on the due date. I just can't get that to translate to the customer cell.

Again, wasn't sure if this would be best suited for VBA or Conditional Formatting. I'm guessing CF but I haven't been able to make it work...

Thanks in advance for your help!
-Greg
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
How about
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQR
1CustomerDueInitial Data RcvdCheck 1Check 2Check 3Check 1Check 2Check 3Check 1Check 2Check 3Check 4Check 5Check 1Check 2Check 3Check 4
2Magnificent Mike's01/03/202201/02/202201/02/202202/02/202203/02/202210/02/202212/02/202215/02/202216/02/202216/02/202216/02/202220/02/202221/02/202223/02/202225/02/202225/02/202225/02/2022
3Brainy Brian's15/04/202201/03/202202/03/202202/03/202208/03/202209/03/202210/03/202210/03/202215/03/202216/03/202217/03/202222/03/202202/04/202203/04/202206/04/202206/04/202210/04/2022
4Jazzy Joe's20/02/202210/02/202211/02/202211/02/202211/02/202212/02/202213/02/202215/02/202218/02/202220/02/202223/02/202226/02/202226/02/202228/02/202228/02/202202/03/202220/03/2022
Main
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A4Expression=MAX($D2:$R2)>=$B2+2textYES
A2:A4Expression=MIN($D2:$R2)>=$C2+1textNO
A2:A4Expression=MAX($D2:$R2)<=$B2+4textYES
 
Upvote 0
Solution
Thank you Fluff! This worked perfectly! I never even considered the 'Stop if True' boxes making a difference with the formatting. Now, I know! :)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top