A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

6 day/week function ie:networkday



 
 
Thread Tools Display Modes
  #1  
Old August 1st, 2007, 03:16 PM posted to microsoft.public.excel.worksheet.functions
Robert
external usenet poster
 
Posts: 717
Default 6 day/week function ie:networkday

i am trying to calculate how many days between 2 dates that excludes
holidays, but includes saturdays. Networkdays is only for 5 day work
weeks...i need it to be for 6 day work weeks.
  #2  
Old August 1st, 2007, 03:40 PM posted to microsoft.public.excel.worksheet.functions
Toppers
external usenet poster
 
Posts: 3,081
Default 6 day/week function ie:networkday

This calculates number of Saturdays in a period so add this to NETWORKDAYS:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))=7))

A1=Start date
B1=End date

"Robert" wrote:

i am trying to calculate how many days between 2 dates that excludes
holidays, but includes saturdays. Networkdays is only for 5 day work
weeks...i need it to be for 6 day work weeks.

  #3  
Old August 1st, 2007, 03:46 PM posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
external usenet poster
 
Posts: 3,232
Default 6 day/week function ie:networkday

This will count Saturdays with start date in A1 and end date in B1

=SUM(INT((WEEKDAY(A1-7)+B1-A1)/7))


this will count all days except Sundays

=SUM(INT((B1-WEEKDAY(A1+1-{2;3;4;5;6;7})-A1+8)/ 7))


this will count holidays with the holidays in L1:L12



=SUMPRODUCT(--(L1:L12=A1),--(L1:L12=B1),--(WEEKDAY(L1:L12)1))


so it can be used to subtract holidays if you are using the second formula


--
Regards,

Peo Sjoblom



"Robert" wrote in message
...
i am trying to calculate how many days between 2 dates that excludes
holidays, but includes saturdays. Networkdays is only for 5 day work
weeks...i need it to be for 6 day work weeks.



  #4  
Old August 1st, 2007, 03:54 PM posted to microsoft.public.excel.worksheet.functions
Robert
external usenet poster
 
Posts: 717
Default 6 day/week function ie:networkday

Thank you very much. This did exactly what i needed it to.

"Toppers" wrote:

This calculates number of Saturdays in a period so add this to NETWORKDAYS:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))=7))

A1=Start date
B1=End date

"Robert" wrote:

i am trying to calculate how many days between 2 dates that excludes
holidays, but includes saturdays. Networkdays is only for 5 day work
weeks...i need it to be for 6 day work weeks.

  #5  
Old August 1st, 2007, 03:56 PM posted to microsoft.public.excel.worksheet.functions
RyGuy
external usenet poster
 
Posts: 40
Default 6 day/week function ie:networkday

Try this:
=NETWORKDAYS((A1),(A2))+INT((A2-WEEKDAY(A2-6)-A1+8)/7)




"Robert" wrote:

i am trying to calculate how many days between 2 dates that excludes
holidays, but includes saturdays. Networkdays is only for 5 day work
weeks...i need it to be for 6 day work weeks.

  #6  
Old August 5th, 2007, 11:46 PM posted to microsoft.public.excel.worksheet.functions
daddylonglegs
external usenet poster
 
Posts: 289
Default 6 day/week function ie:networkday

or just

=INT((WEEKDAY(A1)+B1-A1)/7)

"RyGuy" wrote:

Try this:
=NETWORKDAYS((A1),(A2))+INT((A2-WEEKDAY(A2-6)-A1+8)/7)




"Robert" wrote:

i am trying to calculate how many days between 2 dates that excludes
holidays, but includes saturdays. Networkdays is only for 5 day work
weeks...i need it to be for 6 day work weeks.

  #7  
Old August 6th, 2007, 12:06 AM posted to microsoft.public.excel.worksheet.functions
daddylonglegs
external usenet poster
 
Posts: 289
Default 6 day/week function ie:networkday

Sorry, disregard previous reply

I note the above suggestions which use networkdays and then add a count of
Saturdays....but this will give an incorrect result if you have any Saturday
holidays within the period in question.

You need to use something like Peo's suggestion, i.e. count total days and
then subtract Sundays and non-Sunday holidays, i.e.

=B1-A1+1-INT((WEEKDAY(A1-1)+B1-A1)/7)-SUMPRODUCT(--(L1:L12=A1),--(L1:L12=B1),--(WEEKDAY(L1:L12)1))

or just within one SUMPRODUCT formula

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&B1)))1),--ISNA(MATCH(ROW(INDIRECT(A1&":"&B1)),L1:L12,0)))

"daddylonglegs" wrote:

or just

=INT((WEEKDAY(A1)+B1-A1)/7)

"RyGuy" wrote:

Try this:
=NETWORKDAYS((A1),(A2))+INT((A2-WEEKDAY(A2-6)-A1+8)/7)




"Robert" wrote:

i am trying to calculate how many days between 2 dates that excludes
holidays, but includes saturdays. Networkdays is only for 5 day work
weeks...i need it to be for 6 day work weeks.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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