networkingdays

  • Thread starter Thread starter Soe
  • Start date Start date
S

Soe

currently, in networkingdays formula, you need to put range of holidays,
which u may need to type in somewhere in the worksheet.
how can i NOT provide holidays range and use normal holiday range, say all
sunday are holidays?
what i m trying to do is to count working days between two column excluding
sunday, but i don't want to type all the sundays.
anybody has any suggestion?
 
Hi
NETWORKDAYS does not need this third parameter. It automatically
excludes all sundays and saturdays. e.g.
=NETORKDAYS(A1,B1)
will count all working days between A1 and B1
 
Hi
if A1 stores the starting date and B1 the ending date try
the following array formula (entered with CTRL+SHIFT+ENTER
=B1-A1-SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)
+1)))=1,1,0))
 
Hi Soe

Push Alt+F11

Go to Insert>Module

Paste in the code below

Click the top right X to get back to Excel


Function WorkdaysWithSat(StartDate As Date, EndDate As Date)
Dim i As Integer
For i = 0 To EndDate - StartDate
If Weekday(StartDate + i) <> vbSunday Then
WorkdaysWithSat = WorkdaysWithSat + 1
End If
Next i
End Function


In Column C place

=WorkdaysWithSat(A1,B1)

Where A1 is the ealier date.

** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Business Software Galore!
Free Excel Forum http://www.ozgrid.com/forum ***
 
Back
Top