networking days based on sunday

zia.butt

Board Regular
Joined
Feb 3, 2010
Messages
97
I want formula of networking days if only sunday is considered off only. means one off in a week.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
yes, need for account holiday. or mgiht be used for any other purpose
Try this...

A2 = start date
B2 = end date
C2:C10 = list of holiday dates to exclude from the count

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2)<7),--(ISNA(MATCH(ROW(INDIRECT(A2&":"&B2)),C2:C10,0))))
 
Upvote 0
Below is the VBA Code:

Function six_days_working(start_date As Long, End_date As Long) As Long
Dim i, j As Long
For i = start_date To End_date
If VBA.Weekday(i, vbMonday) < 7 Then
j = j + 1
End If
Next
six_days_working = j
End Function

Hope this will help.....

Shweta
 
Upvote 0
Hi T.Valko,

I appreciate your formula. It works fine.

But I need a favour from you can you please breakup this formula because I am unable to understand the logic behind this.

Regards
Shweta
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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