Conditional format based on number of days over stated date

GJJ

New Member
Joined
Mar 15, 2024
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi all, I'm having trouble working this one out, not sure if anyone can help me out?
So I'm trying to stay on top of multiple ongoing tasks, and trying to colour code my tasks depending on how far past the time for an update is. For example, if I'm altering something today, I'll add todays date in cell D2, and then the number of days before I need to chase up in cell E2, which could be 1, 2, 7, 14 days etc (these would be manually entered depending on my task). So I need the formula to check against the inputted, and how many days past that date it is. If it is equal to the amount of days for me to chase, I want it turn amber, and if it is over the date, it needs to turn red.
Is this possible, or am I not going to get anywhere with this?
Thanks in advance
 

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.
Welcome to the Board!

Where are these dates that you want to compare to?
What is the address where they can be found?
 
  • Like
Reactions: GJJ
Upvote 0
As @Joe4 says it is unclear exactly what you want. But, this can give you a start:

Book1
DEFG
1Date EnteredDays to CompleteAmber RuleRed Rule
22024-03-015FALSETRUE
32024-03-107FALSEFALSE
42024-03-141TRUEFALSE
52024-03-151FALSEFALSE
62024-03-153FALSEFALSE
Sheet1
Cell Formulas
RangeFormula
F2:F6F2=D2+E2=TODAY()
G2:G6G2=D2+E2<TODAY()
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E1:E6Expression=E1+D1<TODAY()textNO
E1:E6Expression=E1+D1=TODAY()textNO
 
  • Like
Reactions: GJJ
Upvote 0
I'd manually type the date of the update Cell D2 e.g.15/3/24 then if I'd put 2 days in cell E3, on the 17/3/24 the line would turn amber, on the 18/3/24 or anytime after, the line would turn red
 
Upvote 0
I'd manually type the date of the update Cell D2 e.g.15/3/24 then if I'd put 2 days in cell E3, on the 17/3/24 the line would turn amber, on the 18/3/24 or anytime after, the line would turn red
I'm guessing you meant E2 instead of E3. Take a look at the suggestion in Post #3.
 
  • Like
Reactions: GJJ
Upvote 0
I'm guessing you meant E2 instead of E3. Take a look at the suggestion in Post #3.
Yes sorry, E2. Thank you, I'll take a look and see if I can get it working. Really appreciate your help (y)
 
Upvote 0
Yes sorry, E2. Thank you, I'll take a look and see if I can get it working. Really appreciate your help (y)
THanks, Here is a suggestion highlighting rows:

Mr Excel Questions 75.xlsm
DEFG
1Date EnteredDays to CompleteAmber RuleRed Rule
22024-03-015FALSETRUE
32024-03-107FALSEFALSE
42024-03-141TRUEFALSE
52024-03-151FALSEFALSE
62024-03-153FALSEFALSE
Sheet7
Cell Formulas
RangeFormula
F2:F6F2=D2+E2=TODAY()
G2:G6G2=D2+E2<TODAY()
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E1:E6,D2:D6,F2:G6Expression=$E1+$D1<TODAY()textNO
E1:E6,D2:D6,F2:G6Expression=$E1+$D1=TODAY()textNO
 
  • Like
Reactions: GJJ
Upvote 0
THanks, Here is a suggestion highlighting rows:

Mr Excel Questions 75.xlsm
DEFG
1Date EnteredDays to CompleteAmber RuleRed Rule
22024-03-015FALSETRUE
32024-03-107FALSEFALSE
42024-03-141TRUEFALSE
52024-03-151FALSEFALSE
62024-03-153FALSEFALSE
Sheet7
Cell Formulas
RangeFormula
F2:F6F2=D2+E2=TODAY()
G2:G6G2=D2+E2<TODAY()
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E1:E6,D2:D6,F2:G6Expression=$E1+$D1<TODAY()textNO
E1:E6,D2:D6,F2:G6Expression=$E1+$D1=TODAY()textNO
This is exactly what I'm trying to achieve, but not sure how you are doing the conditional formatting?
What type of rule do I use? How do I set it up, can't see the option to set it up with the layout you have here.
 
Upvote 0
The "Amber" and "Red" rules are how I build the Conditional Formatting rules.
When you're satisfied with the formula for the rule(s) then you use what is in the first cell (top row) to use as the formatting rule.
Since you're asking for highlighting a ROW, the rule will be fixed for the COLUMN.
When you have the rule you like, press F2 on the top row of one rule. Copy the rule in its entirety, press [ESC] to get out of the cell.
From the home TAB, click Conditional Formatting >> NEW RULE >> Use a Formula To Set Conditional Formatting
In the following Dialog box, paste the rule into the formula entry box. If you want to highlight a row, be sure you precede the COLUMN letter with a dollar sign ($).
Click the FORMAT button.
Choose your fill or other formatting options.
Click OK or APPLY until you're out.

Repeat for the second RULE.

Then copy and paste the formatting wherever you wish.
1710523147473.png
 

Attachments

  • 1710522893370.png
    1710522893370.png
    53.7 KB · Views: 4
  • Like
Reactions: GJJ
Upvote 0
Solution
That has worked great, only thing that I could improve on with this really is that when no dates are entered, it is showing up as red, how would I get this to stay with no fill? So if I wanted to add lines at the bottom that were ready to be filled in, currently these are showing up as red, but ideally would want them as white until I've added the info.
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

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