PDA

View Full Version : Time Calculation Dilemna



markstro
10-12-2015, 02:50 PM
To the most helpful Excel forum yet!!

In H2 I am subtracting the start time of 6:30 am (E2) from =NOW() (G2), to get elapsed time for the day.
E & G 2 is formatted as Custom h:mm AM/PM; H2 is formatted as h:mm;@

I use H2 to compare to the total in (H3) =(F4+H4+J4+L4+L14+H12+H19)+($A$9/24) which adds up the time spent on various issues throughout my day. First range is formatted as h:mm;@ and adds the decimal values of .25, .5, .75 or 1 (15 minute increments, easier to input) for various issues I want to track time for / 24 to give me actual minutes vs. decimal totals, second range is my lunch.

I am trying to conditionally format H3 to Fill Red when H2>H3 to let me know I'm behind on my timekeeping.
This formula is =IF(H2>H3,1,0) with the Fill selected. H3 fills red whether H2 is > or < H3.

Can't figure out what I'm doing wrong, other CF formulas work just fine for me, but not this time formatted data.
Help.

p45cal
10-12-2015, 03:42 PM
This formula is =IF(H2>H3,1,0) with the Fill selected. H3 fills red whether H2 is > or < H3.First, the formula in CF can be shortened to H2>H3.
Second, do you realise that Now() includes date information too (try converting the two cells temporarily to General format)? If other cells contain only time data. then any cell calculated from Now() might have a much larger value than any cell with just time in.
If this proves to be the cause, then change references to Now() to MOD(NOW(),1).

markstro
10-12-2015, 04:08 PM
Perfect mate, many thanks.