Networkdays (with only Sunday as Weekend + holiday list)

nandivada

New Member
Joined
Nov 11, 2004
Messages
30
Is there any way to calculate the difference in dates with only sunday as holidays and with a holiday list.

Networkdays takes Sat also as weekend, we want only sunday as weekend
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Maybe try (the rather complicated):

=NETWORKDAYS(A1,A2,B1:B3)+SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(N(A1)&":"&N(A2))))=7))-SUMPRODUCT(--(WEEKDAY(B1:B3)=7))

where A1 contains the start date, A2 the end date and B1:B3 the holidays.
 
Upvote 0
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)<7))-SUMPRODUCT(--(ISNUMBER(MATCH(ROW(INDIRECT(A1&":"&A2)),B1:B3,0))),--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)<7))

...where A1 contains the start date, A2 contains the end date, and B1:B3 contains the holidays.

Hope this helps!
 
Upvote 0
Andrew Poulsom said:
Maybe try (the rather complicated):

=NETWORKDAYS(A1,A2,B1:B3)+SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(N(A1)&":"&N(A2))))=7))-SUMPRODUCT(--(WEEKDAY(B1:B3)=7))

where A1 contains the start date, A2 the end date and B1:B3 the holidays.

Hi,
thank you for taking time to answer my query.
I am getting a negative answer (-1), on the following scenario

Start Date: 02-10-04
End Date: 03-10-04


Holidays
02-10-04
09-10-04
22-10-04

Please check.

thanks
Prakash
 
Upvote 0
Hi Prakash:

Welcome to MrExcel Board!

Let us try ...

=SUMPRODUCT((WEEKDAY(ROW(INDIRECT(A1&":"&A2)))>1)+0)-SUMPRODUCT(--(ISNUMBER(MATCH(ROW(INDIRECT(A1&":"&A2)),HolidayList,0))))

where A1 and A2 house your dates of interest, and range HolidayList houses your Holidays.
 
Upvote 0
nandivada said:
....
Start Date: 02-10-04
End Date: 03-10-04


Holidays
02-10-04
09-10-04
22-10-04

....

thanks
Prakash
Let us look at this ...
Book1
ABCDE
12-Oct-040HolidayList
23-Oct-042-Oct
39-Oct
422-Oct
Sheet8 (2)


using the formula in my last post!
 
Upvote 0

Forum statistics

Threads
1,215,692
Messages
6,126,227
Members
449,303
Latest member
grantrob

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top