Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default NETWORKDAY function problem - starting on weekends

Hi,

I have used the function that Chip Pearson has supplied on his website
which calculates the difference between 2 dates. My problem is just
when the first date I supply to the function is on the saturday or the
sunday then it adds another day to the result.
example : 28-MAY-05 08:30 till 30-MAY-05 11:15

The time I want is on the 30th (Monday) from 9:00 till 11:15 but I get
an extra day and 7 hours using the formula.

Workhours is from 08:00 till 17:00 on a week day.

If the time started is before 8:00 on a Saturday I can change it to the
friday 17:00 and then the formula works again, but after 08:00 on a
saturday I am back where I started.

The other options is to create 2 new start and end date columns with
only working dates, but I will need to evaluate each date first to see
if it is a weekend and then get the next wotking day at 8:00 .

Any ideas how I can get around that if the range starts or ends on a
weekend or how I can test for a working day on a date supplied ?

Regards
Lourens

  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Not sure what you're looking for.

Do you want networkdays or do you want an elapsed time based on networkdays
and business hours?

Biff

wrote in message
ups.com...
Hi,

I have used the function that Chip Pearson has supplied on his website
which calculates the difference between 2 dates. My problem is just
when the first date I supply to the function is on the saturday or the
sunday then it adds another day to the result.
example : 28-MAY-05 08:30 till 30-MAY-05 11:15

The time I want is on the 30th (Monday) from 9:00 till 11:15 but I get
an extra day and 7 hours using the formula.

Workhours is from 08:00 till 17:00 on a week day.

If the time started is before 8:00 on a Saturday I can change it to the
friday 17:00 and then the formula works again, but after 08:00 on a
saturday I am back where I started.

The other options is to create 2 new start and end date columns with
only working dates, but I will need to evaluate each date first to see
if it is a weekend and then get the next wotking day at 8:00 .

Any ideas how I can get around that if the range starts or ends on a
weekend or how I can test for a working day on a date supplied ?

Regards
Lourens



  #3   Report Post  
 
Posts: n/a
Default

Biff,

I want the elapsed time based on network days and business hours.

Lourens

  #4   Report Post  
 
Posts: n/a
Default

or if possible - if i have a date to check if it is a workday or not
and if it is not, then I want the previous or next working day

  #5   Report Post  
Biff
 
Posts: n/a
Default

example : 28-MAY-05 08:30 till 30-MAY-05 11:15

The time I want is on the 30th (Monday) from 9:00 till 11:15 but I get
an extra day and 7 hours using the formula.


Workhours is from 08:00 till 17:00 on a week day.


If the normal business hours are from 8:00 to 17:00 then why do you want:
"from 9:00 till 11:15 "

Let me ask you this, what result do you expect?

A1 = 28-MAY-05 08:30
B1 = 30-MAY-05 11:15

=IF(NETWORKDAYS(A1,A1)=1,17/24-MOD(A1,1),0)
+IF(NETWORKDAYS(B1,B1)=1,MOD(B1,1)-8/24,0)+NETWORKDAYS(A1+1,B1-1)*9/24

Returns (in h:mm format): 3:15

May 30 2005 was the Memorial Day holiday so I assume you do not want to use
the excluded holidays argument for the Networkdays function. If you did
include that argument and had May 30 2005 listed then the result would have
been 0.

Biff

wrote in message
ups.com...
or if possible - if i have a date to check if it is a workday or not
and if it is not, then I want the previous or next working day





  #6   Report Post  
 
Posts: n/a
Default

Biff, thanks for the reply.
Sorry, typo on my part - I meant from "08:00 tiill 11:15"

Great that is what I am looking for , I will have a go at it.

Regards
Lourens

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
Spellnumber Norman Jones Excel Worksheet Functions 6 December 13th 04 07:21 AM
Excel Send To function problem kysiow Excel Discussion (Misc queries) 1 December 10th 04 01:37 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM
Counting Function Dilemma Simon Lloyd Excel Worksheet Functions 0 November 8th 04 03:13 PM


All times are GMT +1. The time now is 01:40 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"