conditional formatting based on time difference

dombrosm

New Member
Joined
May 22, 2010
Messages
2
I am having trouble creating rules for conditional formating based on the time difference between a static time value in a given cell (time due completion) and the NOW function. I would like to have the format of cells change as the time difference changes.
I would like to have cells that are 4 hours or less from the completion time highlight yellow, and cells 2 hrs or less from completion highlight red.
When I try and subtract a future time value (the time due completion) from a cell with the NOW function, I get an error. I can subtract two cells with static times without any issues but that does not help me with what I need to do.
Does anyone know how I can use excell to do this?
 
Last edited:

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
This seems to work but I think it will be erroneous for due times in the past.

Excel Workbook
A
1Time due
222/05/2010 13:00
322/05/2010 15:00
422/05/2010 17:00
Sheet4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =(A2-NOW())*24<2Abc
A22. / Formula is =(A2-NOW())*24<4Abc
 
Upvote 0
Thanks for the help. I did not know that I had to multiply the difference by 24 hours.
One more thing, we use GMT to track all of our times, is there a easy way to offset the NOW time by X number of hours to adjust for local time differences?
 
Upvote 0

Forum statistics

Threads
1,215,812
Messages
6,127,024
Members
449,352
Latest member
Tileni

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