close

I am using NETWORKDAYS function to determine the number of weekdays between
two dates e.g 01/03/06 to 31/03/06 =networkdays(A6,B6) gives the result 23.
However i now need to detract the number of quot;dead hours and minutes quot;
incurred during those 23 week days between the hours of 1800hrs to 0800hrs
to give the total number of live hours and minutes incurred 0800hrs to
1800hrs on weekdays.

Can you help ??


If A6 and B6 just contain dates

=NETWORKDAYS(A6,B6)*(quot;18:00quot;-quot;08:00quot;)

note this will represent hours from 08:00 on A6 to 18:00 on B6

or if A6 and B6 contain dates/times

=(NETWORKDAYS(A6,B6)-1)*(quot;18:00quot;-quot;08:00quot;) MOD(B6,1)-MOD(A6,1)

in both cases format result cell as [h]:mm--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=525903Well, there are 10 hours between 0800 and 1800 hrs.... so, your net workdays
x 10 would give you the number of live hours. =networkdays(a6,b6)*10

quot;Tony Clarkequot; wrote:

gt; I am using NETWORKDAYS function to determine the number of weekdays between
gt; two dates e.g 01/03/06 to 31/03/06 =networkdays(A6,B6) gives the result 23.
gt; However i now need to detract the number of quot;dead hours and minutes quot;
gt; incurred during those 23 week days between the hours of 1800hrs to 0800hrs
gt; to give the total number of live hours and minutes incurred 0800hrs to
gt; 1800hrs on weekdays.
gt;
gt; Can you help ??

Many thanks daddylonglegs, i'll give it a try.

quot;Tony Clarkequot; wrote:

gt; I am using NETWORKDAYS function to determine the number of weekdays between
gt; two dates e.g 01/03/06 to 31/03/06 =networkdays(A6,B6) gives the result 23.
gt; However i now need to detract the number of quot;dead hours and minutes quot;
gt; incurred during those 23 week days between the hours of 1800hrs to 0800hrs
gt; to give the total number of live hours and minutes incurred 0800hrs to
gt; 1800hrs on weekdays.
gt;
gt; Can you help ??

Hi , i tried these date and time combinations and all work great except those
combinations that have a start time before 0800hrs, as the calculation should
not be including any hours incurred before 0800hrs
(see example lines 1,2 and 3 for errors whereas the calculation works great
for lines 4,5,6)
Is it possible to tell the calculation to ignore any time before 0800hrs on
the start date ??

Start Date time End Date Time Calculation
01/03/2006 05:0003/03/2006 15:0030:00
01/03/2006 06:0003/03/2006 15:0029:00
01/03/2006 07:0003/03/2006 15:0028:00
01/03/2006 08:0003/03/2006 15:0027:00
01/03/2006 09:0003/03/2006 15:0026:00
01/03/2006 10:0003/03/2006 15:0025:00

regards Tony C
--------------------------------
quot;daddylonglegsquot; wrote:

gt;
gt; If A6 and B6 just contain dates
gt;
gt; =NETWORKDAYS(A6,B6)*(quot;18:00quot;-quot;08:00quot;)
gt;
gt; note this will represent hours from 08:00 on A6 to 18:00 on B6
gt;
gt; or if A6 and B6 contain dates/times
gt;
gt; =(NETWORKDAYS(A6,B6)-1)*(quot;18:00quot;-quot;08:00quot;) MOD(B6,1)-MOD(A6,1)
gt;
gt; in both cases format result cell as [h]:mm
gt;
gt;
gt; --
gt; daddylonglegs
gt; ------------------------------------------------------------------------
gt; daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
gt; View this thread: www.excelforum.com/showthread...hreadid=525903
gt;
gt; .
gt;


I was assuming that your start time/date and end time/date would be
within work hours. If not you probably need to use a more complex
formula, i.e.

=(NETWORKDAYS(A2,B2,)-1)*($E$5-$E$4) IF(WEEKDAY(B2,2)gt;5,$E$5,MEDIAN(MOD(B2,1),$E$ 5,$E$4))-IF(WEEKDAY(A2,2)gt;5,$E$4,MEDIAN(MOD(A2,1),$E$5,$E$4 ))

where A2 contains start time/date, B2 contains end time/date, E4
contains daily start time (e.g. 08:00) and E5 contains daily end time
(e.g. 18:00). This allows for your time/dates in A2 and B2 to be any
time, even at weekends--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
View this thread: www.excelforum.com/showthread...hreadid=525903Thats done the trick, most grateful for your help !!

Regards Tony C
------------------------------

quot;daddylonglegsquot; wrote:

gt;
gt; I was assuming that your start time/date and end time/date would be
gt; within work hours. If not you probably need to use a more complex
gt; formula, i.e.
gt;
gt; =(NETWORKDAYS(A2,B2,)-1)*($E$5-$E$4) IF(WEEKDAY(B2,2)gt;5,$E$5,MEDIAN(MOD(B2,1),$E$ 5,$E$4))-IF(WEEKDAY(A2,2)gt;5,$E$4,MEDIAN(MOD(A2,1),$E$5,$E$4 ))
gt;
gt; where A2 contains start time/date, B2 contains end time/date, E4
gt; contains daily start time (e.g. 08:00) and E5 contains daily end time
gt; (e.g. 18:00). This allows for your time/dates in A2 and B2 to be any
gt; time, even at weekends
gt;
gt;
gt; --
gt; daddylonglegs
gt; ------------------------------------------------------------------------
gt; daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
gt; View this thread: www.excelforum.com/showthread...hreadid=525903
gt;
gt;

Good afternoon,
I've been trying to use your formula but it appears not to work on cells
that have no date/time entered. Is there a way to get the empty cells
ignored and give me a correct total (SUM), see example below:

Cell D13 = 10/13/2008 9:00:00 PM
Cell F13 = 10/13/2008 9:30:00 PM
=(NETWORKDAYS(D13,F13)-1)*(quot;15:00quot;-quot;06:30quot;) MOD(F13,1)-MOD(D13,1)

Cell N13 = 00:30
=SUM(N13:OFFSET(N21,-1,0))

Cell D14 = lt;blankgt;
Cell F14 = lt;blankgt;
=(NETWORKDAYS(D14,F14)-1)*(quot;15:00quot;-quot;06:30quot;) MOD(F14,1)-MOD(D14,1)
Cell N14 = ############## (indicating negative dates or times)

I'm trying to total a list of these results from cell N13 through cell N21
by using the following formula:
=SUM(N13:OFFSET(N21,-1,0))

When I SUM all the cells (N13 through N20) I get 14:30 but that's incorrect,
it should equal 48:30. Cell formats are [h]:mm and my cell values are as
follows:
N13 = 00:30
N14 = 02:15
N15 = 02:00
N16 = ######
N17 = ######
N18 = ######
N19 = 43:45
N20 = ######

Any guidance on my dilemma is greatly appreciated!quot;daddylonglegsquot; wrote:

gt;
gt; If A6 and B6 just contain dates
gt;
gt; =NETWORKDAYS(A6,B6)*(quot;18:00quot;-quot;08:00quot;)
gt;
gt; note this will represent hours from 08:00 on A6 to 18:00 on B6
gt;
gt; or if A6 and B6 contain dates/times
gt;
gt; =(NETWORKDAYS(A6,B6)-1)*(quot;18:00quot;-quot;08:00quot;) MOD(B6,1)-MOD(A6,1)
gt;
gt; in both cases format result cell as [h]:mm
gt;
gt;
gt; --
gt; daddylonglegs
gt; ------------------------------------------------------------------------
gt; daddylonglegs's Profile: www.excelforum.com/member.php...oamp;userid=30486
gt; View this thread: www.excelforum.com/showthread...hreadid=525903
gt;
gt; .
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()