Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default networkdays issue


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default networkdays issue

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default networkdays issue

Mike,

thank you very much again for the help on this (again lol)

"Mike H" wrote:

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default networkdays issue

Mike,

It doesn't seem to be spanning days

for example Q32636 is 5/4/2010 01:00am (march 5 2010 1am start of business)
T32636 is 09/04/2010 10:00 (end of business day)

using that function I get 9:00:00 its only subtracting the two times. I
would expect 40:00:00 for 40 work hours for the week. Or should I be looking
at a macro to do this? Remember im trying to find out how many work hours a
ticket has been opened only figuring in 8 hours a work day.

AJ

"Mike H" wrote:

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default networkdays issue

Hi,

I'm not really a liker of that formula you used but as it 'seemed' to be
doing what you wanted I never altered it. I prefer this formatted as [h]:mm:ss

Now at the start of the formula you will se 17.5 and this refers to the end
of your working day 17:30 or 5:30 PM

About a 1/3rd of the way through the formula note the 8.5, this is the start
of your day 08:30.

Change these to to meet your requirements

=SUM(17.5/24-MOD(Q838,INT(Q838)),MOD(T838,INT(B1))-8.5/24)+(NETWORKDAYS(Q838,T838)-2)*9/24
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

Mike,

It doesn't seem to be spanning days

for example Q32636 is 5/4/2010 01:00am (march 5 2010 1am start of business)
T32636 is 09/04/2010 10:00 (end of business day)

using that function I get 9:00:00 its only subtracting the two times. I
would expect 40:00:00 for 40 work hours for the week. Or should I be looking
at a macro to do this? Remember im trying to find out how many work hours a
ticket has been opened only figuring in 8 hours a work day.

AJ

"Mike H" wrote:

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default networkdays issue

Hi,

This is longer but I think it's a lot more robust

=((NETWORKDAYS(Q838,T838)-1)*("17:30"-"8:30")+IF(WEEKDAY(T838,2)5,"17:30",MEDIAN(MOD(T8 38,1),"17:30","8:30"))-IF(WEEKDAY(Q838,2)5,"8:30",MEDIAN(MOD(Q838,1),"17 :30","8:30")))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mike H" wrote:

Hi,

I'm not really a liker of that formula you used but as it 'seemed' to be
doing what you wanted I never altered it. I prefer this formatted as [h]:mm:ss

Now at the start of the formula you will se 17.5 and this refers to the end
of your working day 17:30 or 5:30 PM

About a 1/3rd of the way through the formula note the 8.5, this is the start
of your day 08:30.

Change these to to meet your requirements

=SUM(17.5/24-MOD(Q838,INT(Q838)),MOD(T838,INT(B1))-8.5/24)+(NETWORKDAYS(Q838,T838)-2)*9/24
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

Mike,

It doesn't seem to be spanning days

for example Q32636 is 5/4/2010 01:00am (march 5 2010 1am start of business)
T32636 is 09/04/2010 10:00 (end of business day)

using that function I get 9:00:00 its only subtracting the two times. I
would expect 40:00:00 for 40 work hours for the week. Or should I be looking
at a macro to do this? Remember im trying to find out how many work hours a
ticket has been opened only figuring in 8 hours a work day.

AJ

"Mike H" wrote:

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default networkdays issue

Mike this is awesome and exactly what im looking for but im geting an extra
hour per day which I would expect since 8-5 is 9 hours. Now I need to
figure out how to account for lunch thanks again this script is much better
than we originally started. and im for the most part understanding it all,
the If is a new curve that i need to logically go through in my head thanks
again.

"Mike H" wrote:

Hi,

This is longer but I think it's a lot more robust

=((NETWORKDAYS(Q838,T838)-1)*("17:30"-"8:30")+IF(WEEKDAY(T838,2)5,"17:30",MEDIAN(MOD(T8 38,1),"17:30","8:30"))-IF(WEEKDAY(Q838,2)5,"8:30",MEDIAN(MOD(Q838,1),"17 :30","8:30")))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mike H" wrote:

Hi,

I'm not really a liker of that formula you used but as it 'seemed' to be
doing what you wanted I never altered it. I prefer this formatted as [h]:mm:ss

Now at the start of the formula you will se 17.5 and this refers to the end
of your working day 17:30 or 5:30 PM

About a 1/3rd of the way through the formula note the 8.5, this is the start
of your day 08:30.

Change these to to meet your requirements

=SUM(17.5/24-MOD(Q838,INT(Q838)),MOD(T838,INT(B1))-8.5/24)+(NETWORKDAYS(Q838,T838)-2)*9/24
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

Mike,

It doesn't seem to be spanning days

for example Q32636 is 5/4/2010 01:00am (march 5 2010 1am start of business)
T32636 is 09/04/2010 10:00 (end of business day)

using that function I get 9:00:00 its only subtracting the two times. I
would expect 40:00:00 for 40 work hours for the week. Or should I be looking
at a macro to do this? Remember im trying to find out how many work hours a
ticket has been opened only figuring in 8 hours a work day.

AJ

"Mike H" wrote:

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default networkdays issue

Glad I could help. Not sure how/if this can be solved for a lunchbreak, I'll
have to think about it.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

Mike this is awesome and exactly what im looking for but im geting an extra
hour per day which I would expect since 8-5 is 9 hours. Now I need to
figure out how to account for lunch thanks again this script is much better
than we originally started. and im for the most part understanding it all,
the If is a new curve that i need to logically go through in my head thanks
again.

"Mike H" wrote:

Hi,

This is longer but I think it's a lot more robust

=((NETWORKDAYS(Q838,T838)-1)*("17:30"-"8:30")+IF(WEEKDAY(T838,2)5,"17:30",MEDIAN(MOD(T8 38,1),"17:30","8:30"))-IF(WEEKDAY(Q838,2)5,"8:30",MEDIAN(MOD(Q838,1),"17 :30","8:30")))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mike H" wrote:

Hi,

I'm not really a liker of that formula you used but as it 'seemed' to be
doing what you wanted I never altered it. I prefer this formatted as [h]:mm:ss

Now at the start of the formula you will se 17.5 and this refers to the end
of your working day 17:30 or 5:30 PM

About a 1/3rd of the way through the formula note the 8.5, this is the start
of your day 08:30.

Change these to to meet your requirements

=SUM(17.5/24-MOD(Q838,INT(Q838)),MOD(T838,INT(B1))-8.5/24)+(NETWORKDAYS(Q838,T838)-2)*9/24
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

Mike,

It doesn't seem to be spanning days

for example Q32636 is 5/4/2010 01:00am (march 5 2010 1am start of business)
T32636 is 09/04/2010 10:00 (end of business day)

using that function I get 9:00:00 its only subtracting the two times. I
would expect 40:00:00 for 40 work hours for the week. Or should I be looking
at a macro to do this? Remember im trying to find out how many work hours a
ticket has been opened only figuring in 8 hours a work day.

AJ

"Mike H" wrote:

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
AJ AJ is offline
external usenet poster
 
Posts: 99
Default networkdays issue


initially i was thinking of just doing a -1 somewhere to off set the hours
for the day but then i thought why do that its one hour per day figure out
how many total days then minus that from the end result. But if you think of
a way please send me an email to jessopataoldotcom thanks again for all the
help.


"Mike H" wrote:

Glad I could help. Not sure how/if this can be solved for a lunchbreak, I'll
have to think about it.
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

Mike this is awesome and exactly what im looking for but im geting an extra
hour per day which I would expect since 8-5 is 9 hours. Now I need to
figure out how to account for lunch thanks again this script is much better
than we originally started. and im for the most part understanding it all,
the If is a new curve that i need to logically go through in my head thanks
again.

"Mike H" wrote:

Hi,

This is longer but I think it's a lot more robust

=((NETWORKDAYS(Q838,T838)-1)*("17:30"-"8:30")+IF(WEEKDAY(T838,2)5,"17:30",MEDIAN(MOD(T8 38,1),"17:30","8:30"))-IF(WEEKDAY(Q838,2)5,"8:30",MEDIAN(MOD(Q838,1),"17 :30","8:30")))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mike H" wrote:

Hi,

I'm not really a liker of that formula you used but as it 'seemed' to be
doing what you wanted I never altered it. I prefer this formatted as [h]:mm:ss

Now at the start of the formula you will se 17.5 and this refers to the end
of your working day 17:30 or 5:30 PM

About a 1/3rd of the way through the formula note the 8.5, this is the start
of your day 08:30.

Change these to to meet your requirements

=SUM(17.5/24-MOD(Q838,INT(Q838)),MOD(T838,INT(B1))-8.5/24)+(NETWORKDAYS(Q838,T838)-2)*9/24
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:

Mike,

It doesn't seem to be spanning days

for example Q32636 is 5/4/2010 01:00am (march 5 2010 1am start of business)
T32636 is 09/04/2010 10:00 (end of business day)

using that function I get 9:00:00 its only subtracting the two times. I
would expect 40:00:00 for 40 work hours for the week. Or should I be looking
at a macro to do this? Remember im trying to find out how many work hours a
ticket has been opened only figuring in 8 hours a work day.

AJ

"Mike H" wrote:

Hi,

The *24 at the end is making the formula return a decimal so delete it and
then format the cell as time and you will get

4 hours 16 minutes and 34 seconds

=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"AJ" wrote:


This is my Q838 field: 3/3/2010 4:06:08 PM
This is my T838 field: 3/3/2010 8:22:42 PM
This is my function:
=((NETWORKDAYS(Q838,T838)-1)*("10:00"-"01:00")+MOD(T838,1)-MOD(Q838,1))*24

What I get is 16:06
what I would expect to get is 4 hours 16 minutes and 34 seconds

What did I do wrong in the function to get such a difference?


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
NETWORKDAYS #NAME? Angiewelly Excel Discussion (Misc queries) 4 April 7th 08 04:20 PM
NETWORKDAYS? Maybe not? Ken Excel Discussion (Misc queries) 2 March 28th 08 02:08 PM
networkdays JK Excel Worksheet Functions 5 May 7th 07 07:52 PM
networkdays rsenn Excel Worksheet Functions 0 November 24th 05 12:42 AM
NETWORKDAYS = 0 ann Excel Discussion (Misc queries) 4 October 3rd 05 10:07 PM


All times are GMT +1. The time now is 07:54 PM.

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"