Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Networkdays plus Sundays

Hi,
I need to calculate the number of work days between two dates that
includes Sundays as a workday. So only Saturday would be excluded. Is there
a way to count the number of Sundays between two dates? I could then just
add that to the result of the NetWorkDays function.

Thanks!
- Kurt
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DKS DKS is offline
external usenet poster
 
Posts: 103
Default Networkdays plus Sundays

I would use a combination of the following:

First step = end_date minus start_date divided by 7 and take only the
integer part.

Second step = using the WEEKDAY function to identify if another extra Sunday
needs to be added or not?

Best of luck.

"Kurt Levitan" wrote:

Hi,
I need to calculate the number of work days between two dates that
includes Sundays as a workday. So only Saturday would be excluded. Is there
a way to count the number of Sundays between two dates? I could then just
add that to the result of the NetWorkDays function.

Thanks!
- Kurt

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Networkdays plus Sundays

If you DON'T need to account for any holidays:

F1 = start date
G1 = end date

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(F1&":"&G1)))<7))

If you DO need to account for holidays:

List of holiday dates to be excluded from the calculation in I1:I10

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(F1&":"&G1)))<7))-SUMPRODUCT(--(ISNUMBER(MATCH(ROW(INDIRECT(F1&":"&G1)),I1:I10,0) )))

Biff

"Kurt Levitan" wrote in message
...
Hi,
I need to calculate the number of work days between two dates that
includes Sundays as a workday. So only Saturday would be excluded. Is
there
a way to count the number of Sundays between two dates? I could then just
add that to the result of the NetWorkDays function.

Thanks!
- Kurt



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Networkdays plus Sundays

Thanks Biff,
You actually provided me with a simpler answer in another post for
somneone else. I can use the Network Days to get the week days minus
holidays and then use : SUM(INT((WEEKDAY(A1-7,2)+B1-A1)/7)) to add back in
the Sundays.

- Kurt

"Biff" wrote:

If you DON'T need to account for any holidays:

F1 = start date
G1 = end date

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(F1&":"&G1)))<7))

If you DO need to account for holidays:

List of holiday dates to be excluded from the calculation in I1:I10

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(F1&":"&G1)))<7))-SUMPRODUCT(--(ISNUMBER(MATCH(ROW(INDIRECT(F1&":"&G1)),I1:I10,0) )))

Biff

"Kurt Levitan" wrote in message
...
Hi,
I need to calculate the number of work days between two dates that
includes Sundays as a workday. So only Saturday would be excluded. Is
there
a way to count the number of Sundays between two dates? I could then just
add that to the result of the NetWorkDays function.

Thanks!
- Kurt




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Networkdays plus Sundays

I was going to suggest that but I thought what I did suggest is a little
easier to understand and maintain if the need arises.

Thanks for the feedback!

Biff

"Kurt Levitan" wrote in message
...
Thanks Biff,
You actually provided me with a simpler answer in another post for
somneone else. I can use the Network Days to get the week days minus
holidays and then use : SUM(INT((WEEKDAY(A1-7,2)+B1-A1)/7)) to add back
in
the Sundays.

- Kurt

"Biff" wrote:

If you DON'T need to account for any holidays:

F1 = start date
G1 = end date

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(F1&":"&G1)))<7))

If you DO need to account for holidays:

List of holiday dates to be excluded from the calculation in I1:I10

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(F1&":"&G1)))<7))-SUMPRODUCT(--(ISNUMBER(MATCH(ROW(INDIRECT(F1&":"&G1)),I1:I10,0) )))

Biff

"Kurt Levitan" wrote in message
...
Hi,
I need to calculate the number of work days between two dates that
includes Sundays as a workday. So only Saturday would be excluded. Is
there
a way to count the number of Sundays between two dates? I could then
just
add that to the result of the NetWorkDays function.

Thanks!
- Kurt






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
Combining an If Statement with NETWORKDAYS function Shirley Munro Excel Discussion (Misc queries) 1 June 21st 06 12:42 PM
networkdays vs days360 Toothfaerie Excel Discussion (Misc queries) 1 May 31st 06 02:56 AM
# of Sundays in a year lsmft Excel Discussion (Misc queries) 18 April 27th 06 02:26 PM
networkdays rsenn Excel Worksheet Functions 0 November 24th 05 12:42 AM
MS Excel Function - Networkdays Nilesh Inamdar Excel Worksheet Functions 3 November 26th 04 07:10 PM


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