ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Conditional Formatting not working right (https://www.excelbanter.com/excel-worksheet-functions/451146-conditional-formatting-not-working-right.html)

Christopher Jack

Conditional Formatting not working right
 
Hello,

I have a time tracker with calculated times, then based on input of actual times the color of the time is suppose to go red if greater then the calculated time.

A = START
B = ARRIVE
C = SUPPLY (YES/NO)
D = DONE LOADING
E = DONE

The Calculated times are in row 2
The Actual times are in row 3

For each calculated time the formula is similar to:
a2 =if(e2="","",if(c2="NO", e2-"03:00", e2-"02:30"))
b2 =if(e2="","",if(c2="NO", e2-"01:45", e2-"01:00"))
d2 =if(e2="","",if(c2="NO", e2-"00:40", ""))

I set up the conditional formatting as such for the times with a calculated entry
Cell greater than =MOD(a2, 1) change font color to Red for =$a$3

Additionally there is a conditional formatting to gray out some cells if SUPPLY is NO
formula =c2="NO" change fill to Gray for cells c2:d3

The formatting for all the time cells is hh:mm

This normally produces the required result but occasionally it turns red when the times are equal or greater.

e.g.
e2=12:00 ; d2=11:20 causes d3=11:20 to turn red
e2=16:00 ; d2=15:20 causes d3=15:20 to stays black

Does anyone have any ideas what might be causing the issue. Or what I might be able to fix this. Using MS Office 2010.

Thank you.
~~Chris

Christopher Jack

Conditional Formatting not working right
 
For anyone who read this, I figured out a way that works. In my calculated entries, I added an extra 30 seconds so that the conditional formatting works when the "times" are the same.

e.g. e2-"03:00" + "00:00:30"

~~Chris


All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com