Conditional formatting - Is there a quicker way?

Beau the dog

Board Regular
Joined
Mar 8, 2021
Messages
72
Office Version
  1. 365
Platform
  1. Windows
Good afternoon all,

I have a much larger data table, but hopefully you can assist with the simplified extract below

I am creating a training matrix. Column D and F are the dates the training was taken. Column E and G are the dates when its next due based on adding the number of years shown by the numbers in bold.

I want to colour code the dates in column D and F as they get closer to the due date in the adjacent column...How can I do this without doing it one by one please?! Once completed I will hide the due date columns.

Colour codes
within 6 months - Blue
Within 1 month - Orange
Passed - Red

For note my actual table has many more columns and 45 rows. But if you can help, I should be able to modify to suit.

DEFG
Induction ChecklistWheel Security
2 YearsDue3 YearsDue
15/01/2115/01/2317/08/2017/08/23
15/02/1915/02/2121/01/1821/01/21
27/03/2027/03/2210/12/1910/12/22
02/04/2102/04/2320/01/1920/01/22
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
How about
+Fluff 1.xlsm
DEFG
1Induction ChecklistWheel Security
2
32 YearsDue3 YearsDue
415/01/202115/01/202317/08/202017/08/2023
515/02/201915/02/202121/01/201821/01/2021
627/03/202027/03/202210/12/201910/12/2022
702/04/202102/04/202320/01/201920/01/2022
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D4:D7,F4:F7Expression=TODAY()>=E4textNO
D4:D7,F4:F7Expression=TODAY()>=EDATE(E4,-1)textNO
D4:D7,F4:F7Expression=TODAY()>=EDATE(E4,-6)textNO
 
Upvote 0
Thank you, that works absolutely fine.

Am I right in thinking there is no way to do this without the helper columns? The conditional formatting would have to also work out the due date...
 
Upvote 0
How about
+Fluff 1.xlsm
DEFG
1Induction ChecklistWheel Security
2
32 YearsDue3 YearsDue
415/01/202115/01/202317/08/202017/08/2023
515/02/201915/02/202121/01/201821/01/2021
627/03/202027/03/202210/12/201910/12/2022
702/04/202102/04/202320/01/201920/01/2022
Data
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D4:D7,F4:F7Expression=TODAY()>=EDATE(D4,LEFT(D$3)*12)textNO
D4:D7,F4:F7Expression=TODAY()>=EDATE(D4,LEFT(D$3)*12-1)textNO
D4:D7,F4:F7Expression=TODAY()>=EDATE(D4,LEFT(D$3)*12-6)textNO
 
Upvote 0
Solution
You sir...are a bit of a legend! This works perfectly and will save me a lot of time.

Thank you
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,825
Members
449,096
Latest member
Erald

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