Consulting

Results 1 to 6 of 6

Thread: Timeformat Sum Up and Separation Based on Conditions

  1. #1
    VBAX Contributor
    Joined
    May 2010
    Posts
    106
    Location

    Timeformat Sum Up and Separation Based on Conditions

    Dear All,

    In my previous thread, I had asked the sum up based on segregation as per the total of 24 in first column and next column carry forward.

    Now, in my sheet, I have changed 24 not as value but as time hrs:mm. (24:00), in column E.

    Now below formula does not work, can you suggest how to modified for time format [h]:m.

    =IF(SUM($E$4:$E4)<=24,MIN(24,SUM($E$5:$E5))-SUM($E$4:$E4),"")
    and
    =IF(SUM($E$5:$E5)<=24,"",E5-N(G5))

    Regards,
    RL>

    http://www.vbaexpress.com/forum/showthread.php?t=42609

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Change the foormulas to

    =IF(SUM($E$4:$E4)<=1,MIN(1,SUM($E$5:$E5))-SUM($E$4:$E4),"")

    and

    =IF(SUM($E$5:$E5)<=1,"",E5-N(G5))

    and format the cells as [h]:mm
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Contributor
    Joined
    May 2010
    Posts
    106
    Location
    Thanks A Lot, Once Again!

    I changed the Value 24 to 1, & Work Great. But what is fundamental behind this?

    Can you pls teach me this fundamental in very short!!!

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Time is a fraction of one day, hence the 1.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Contributor
    Joined
    May 2010
    Posts
    106
    Location
    So for understanding!

    12 hrs = 0.5
    24 hrs = 1

    Right?

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Dead right.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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