Results 1 to 8 of 8

Thread: Total hours b/w two m/d/yy h:mm stamps?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    boston
    Posts
    22

    Angry Total hours b/w two m/d/yy h:mm stamps?

    Hello, does anyone know the excel formula if I want to calculate the total working hours between two date and time stamps like so:

    3/8/02 1:00
    3/9/02 15:00
    start work at 9:00
    end work at 17:00

    Result: 6.00 hrs (total "active" working time)

    Thank you for any direction!

  2. #2
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    Have a look at this, if it isn't exactly what you want it should still give you an idea of what to do:
    Attached Files Attached Files
    What is the answer to this question?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    boston
    Posts
    22

    need days too

    Hello, Thank you but that does not calculate networkdays at all.

  4. #4
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    Can it you explain it a bit more then please?
    What is the answer to this question?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    boston
    Posts
    22

    working hours

    Hello Martin,

    Sorry for the delay, and I do appreciate your hint. Only this problem is really bugging me! I have attached all my work (including a rearrangement of your tip), see other sheets too for other examples that come close... I have surfed and surfed and adopted different little codes, but there does not seem to be a solid solution where the networkday and time calculations work for all tests! Thank you for any input or direction.

    Take good care.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    boston
    Posts
    22

    working hours

    Hello Martin,

    Sorry for the delay, and I do appreciate your hint. Only this problem is really bugging me! I have attached all my work (including a rearrangement of your tip), see other sheets too for other examples that come close... I have surfed and surfed and adopted different little codes, but there does not seem to be a solid solution where the networkday and time calculations work for all tests! Thank you for any input or direction.

    Take good care.

  7. #7
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    I think I have done it
    It works with all the examples you gave.
    You can probably make it all in to one formula if you like.
    Attached Files Attached Files
    Last edited by Martin Wilson; Apr 16th, 2002 at 03:40 PM.
    What is the answer to this question?

  8. #8
    Addicted Member Martin Wilson's Avatar
    Join Date
    Mar 2002
    Location
    :)
    Posts
    236
    I got bored:
    Code:
    =IF(DAY(C8)=DAY(B8),(IF(((G8-(IF((G8-E8)<0,0,(G8-E8))))-(F8+(IF((D8-F8)<0,0,(D8-F8)))))<0,0,((G8-(IF((G8-E8)<0,0,(G8-E8))))-(F8+(IF((D8-F8)<0,0,(D8-F8))))))),((IF(((G8-F8)-(IF((G8-E8)<0,0,(G8-E8))))<0,0,((G8-F8)-(IF((G8-E8)<0,0,(G8-E8)))))+(IF(((NETWORKDAYS(B8,C8)-2)*(G8-F8))<0,0,((NETWORKDAYS(B8,C8)-2)*(G8-F8))))+(IF(((G8-F8)-(IF((D8-F8)<0,0,(D8-F8))))<0,0,((G8-F8)-(IF((D8-F8)<0,0,(D8-F8)))))))))
    I am sure it can be shortened!

    Wow, that is one big line!
    What is the answer to this question?

Posting Permissions

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



Click Here to Expand Forum to Full Width