Two dates, two cells - How do I format the second cell to change colour after x amount of time has elapsed from the first date?

Kikaiki

New Member
Joined
Nov 26, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
So, I have a workbook of jobs that have 'Job start' and 'Job Finish' values as part of it - For this example, lets say 'Job Start' is column C, and 'Job End' is column D - Both have Date and Time in each cell.

I need the cells in column D to turn red if the data is over 2 days from that in column C

For example:

22/11/2024 09:1625/11/2024 08:00

The time between these is more than 2 days so I need the cell on the right to turn red

I've looked around but I can't seem to fina any formulas that do specifically this, they are more aimed at turning the same cell red if elapses=
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hello! Is this what you need?
TRT.xlsx
CD
122.11.2024 9:1625.11.2024 8:00
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D1Expression=C1+2textNO
 
Upvote 0
Hello! Is this what you need?
TRT.xlsx
CD
122.11.2024 9:1625.11.2024 8:00
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D1Expression=C1+2textNO
So, yes ... but - I can't seem to put it into play?

I don't know whether it's because im used to old excel conditional formatting where you had to type out the full formula, but i just can't seem to get an formula for this to work in 365 :(

I'm not sure if i'm just have a very dim moment and missing something very simple, or i'm doing it entirely wrong.

I thought i had it working for a second, then went to apply it to the additional rows and they all just turned red regardless.

If you could step by step it for me i would appreciate it - It appears my excel skills are rustier than I would have liked to admit :/
 
Upvote 0
1732714509768.png


So from this : Rows 1-3 I would expect to turn red as they exceeded 2 days, but the next three wouldn't as they are within the limit i am trying to set

I am basically looking to CD column D to react to Column C but doing a terrible job of it **sigh**1
 
Upvote 0
Try:
Book1
CD
111/22/24 9:1611/25/24 8:00
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D1Expression=(D1-C1)>2textNO
 
Upvote 0
Solution
TRT.xlsx
CD
115.11.2024 12:3627.11.2024 8:00
218.11.2024 18:2122.11.2024 12:00
322.11.2024 9:1625.11.2024 8:00
425.11.2024 15:2926.11.2024 13:00
524.11.2024 13:0425.11.2024 8:00
619.11.2024 16:3423.11.2024 10:00
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D1:D6Expression=DATEDIF(C1; D1; "d")>2textNO
 
Upvote 0
TRT.xlsx
CD
115.11.2024 12:3627.11.2024 8:00
218.11.2024 18:2122.11.2024 12:00
322.11.2024 9:1625.11.2024 8:00
425.11.2024 15:2926.11.2024 13:00
524.11.2024 13:0425.11.2024 8:00
619.11.2024 16:3423.11.2024 10:00
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D1:D6Expression=DATEDIF(C1; D1; "d")>2textNO

So, I copy and pasted:

1732796573327.png


And got this:

1732796548325.png
 
Upvote 0
Try:
Book1
CD
111/22/24 9:1611/25/24 8:00
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D1Expression=(D1-C1)>2textNO
We have a winner!! Thankyou!!

I'm kicking myself for it being so simple but at least we got there :)
 
Upvote 0

Forum statistics

Threads
1,225,491
Messages
6,185,298
Members
453,286
Latest member
JCM

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