Consulting

Results 1 to 3 of 3

Thread: Time Calculation Dilemna

  1. #1
    VBAX Regular
    Joined
    Oct 2015
    Location
    Vista CA
    Posts
    36
    Location

    Time Calculation Dilemna

    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.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    Quote Originally Posted by markstro View Post
    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).
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Regular
    Joined
    Oct 2015
    Location
    Vista CA
    Posts
    36
    Location
    Perfect mate, many thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •