View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
mikebres mikebres is offline
external usenet poster
 
Posts: 89
Default Workdays in a date range with Saturday as a workday

Well, I work for the Postal Service, and while Sunday isn't a delivery day,
work is still being done on Sunday to get the mail delivered. We are using
sample mail to test the internal processes to make sure they are being
followed. Sometimes we start the mail on Sunday so I need to include that as
a possibility.

"Rick Rothstein (MVP - VB)" wrote:

Wow, that's impressive, and I learned about a new operator, the \.
If I understand it, you are using 6 days for each week up to the last one.
Then you are looping through the last week to see if there is a Sunday in
the
date range. Pretty slick.


Not sure about "slick", but yes, that is how the function works.


Your function gave me exactly what I asked for, but it exposed a fallicy
in
my logic. I asked for the number of workdays thinking that would get me
what
I needed. However, I now realize what I need is a different type of
calculation. For example if I start on 5/26 and end on 5/29 then it took
me
2 days (not counting Sunday) to deliver the product. However if I start
on
5/27 and end on 5/29 then it still took me 2 days since I started on
Sunday.
Does that make sense?


No, I am sorry, but it does not make sense. How can you start your job on a
Sunday if Sunday is not a workday?


Rick