Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Negative Working Hours
Hi Folks,
I'm hoping yous can help me, a few weeks ago I put up a couple of posts on calculating working hours with the use of the networkdays function. This works great, however I seem to be getting negative values causes by calculating time over the weekend(outwith working hours). Please example below. A B 1 01/07/2005 11:50 01/07/2005 13:49 2 06/07/2005 16:03 06/07/2005 17:00 3 08/07/2005 13:43 11/07/2005 09:36 Using the following expression I get these values. =(NETWORKDAYS(B2,A2)-1)*8.5+(MOD(B2,1)-MOD(A2,1))*24 = 1.99 =(NETWORKDAYS(B3,A3)-1)*8.5+(MOD(B3,1)-MOD(A3,1))*24 = 0.95 =(NETWORKDAYS(B4,A4)-1)*8.5+(MOD(B4,1)-MOD(A4,1))*24 = -29.61 Any ideas on how I can accurately give the number of hours for cells A3 and B3? Thanks in advance, Mo.. |
#2
|
|||
|
|||
I think you have your A and B back to front
=(NETWORKDAYS(A4,B4)-1)*8.5+(MOD(B4,1)-MOD(A4,1))*24 -- HTH RP (remove nothere from the email address if mailing direct) "Mohammed Zenuwah" wrote in message ... Hi Folks, I'm hoping yous can help me, a few weeks ago I put up a couple of posts on calculating working hours with the use of the networkdays function. This works great, however I seem to be getting negative values causes by calculating time over the weekend(outwith working hours). Please example below. A B 1 01/07/2005 11:50 01/07/2005 13:49 2 06/07/2005 16:03 06/07/2005 17:00 3 08/07/2005 13:43 11/07/2005 09:36 Using the following expression I get these values. =(NETWORKDAYS(B2,A2)-1)*8.5+(MOD(B2,1)-MOD(A2,1))*24 = 1.99 =(NETWORKDAYS(B3,A3)-1)*8.5+(MOD(B3,1)-MOD(A3,1))*24 = 0.95 =(NETWORKDAYS(B4,A4)-1)*8.5+(MOD(B4,1)-MOD(A4,1))*24 = -29.61 Any ideas on how I can accurately give the number of hours for cells A3 and B3? Thanks in advance, Mo.. |
#3
|
|||
|
|||
Hi Bob,
Thank your a legend, that worked a treat.. Best regards, Mo.. "Bob Phillips" wrote: I think you have your A and B back to front =(NETWORKDAYS(A4,B4)-1)*8.5+(MOD(B4,1)-MOD(A4,1))*24 -- HTH RP (remove nothere from the email address if mailing direct) "Mohammed Zenuwah" wrote in message ... Hi Folks, I'm hoping yous can help me, a few weeks ago I put up a couple of posts on calculating working hours with the use of the networkdays function. This works great, however I seem to be getting negative values causes by calculating time over the weekend(outwith working hours). Please example below. A B 1 01/07/2005 11:50 01/07/2005 13:49 2 06/07/2005 16:03 06/07/2005 17:00 3 08/07/2005 13:43 11/07/2005 09:36 Using the following expression I get these values. =(NETWORKDAYS(B2,A2)-1)*8.5+(MOD(B2,1)-MOD(A2,1))*24 = 1.99 =(NETWORKDAYS(B3,A3)-1)*8.5+(MOD(B3,1)-MOD(A3,1))*24 = 0.95 =(NETWORKDAYS(B4,A4)-1)*8.5+(MOD(B4,1)-MOD(A4,1))*24 = -29.61 Any ideas on how I can accurately give the number of hours for cells A3 and B3? Thanks in advance, Mo.. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculating working hours | Excel Worksheet Functions | |||
Calculating working hours | Excel Discussion (Misc queries) | |||
How to show negative time (e.g. -10 hours) | Excel Worksheet Functions | |||
How can I show hours of more than 24 & negative hours? | Excel Worksheet Functions | |||
Subtracting paid hours from unpaid hours | Excel Worksheet Functions |