Networkdays plus Sundays

G

Guest

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
 
G

Guest

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.
 
G

Guest

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.
 
B

Biff

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
 
B

Biff

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
 
G

Guest

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
 
G

Guest

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
 
B

Biff

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
 
B

Biff

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top