Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mohammed Zenuwah
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

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   Report Post  
Mohammed Zenuwah
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating working hours John Excel Worksheet Functions 3 July 1st 05 05:44 AM
Calculating working hours Sarah Excel Discussion (Misc queries) 3 March 13th 05 11:42 PM
How to show negative time (e.g. -10 hours) Arhippa Excel Worksheet Functions 3 January 19th 05 08:53 AM
How can I show hours of more than 24 & negative hours? Peterlg Excel Worksheet Functions 1 January 18th 05 04:50 PM
Subtracting paid hours from unpaid hours ejerry7 Excel Worksheet Functions 5 November 29th 04 04:16 AM


All times are GMT +1. The time now is 08:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"