Add Working Days

This allows you to add working days. You have a date e.g. start date in one cell and then this formula points towards that cell then adds working days e.g. 5. Ideal for working out an SLA.

Function ADDWORKINGDAYS(datOne As Date, intWorkDaysToAdd As Integer)As Date Dim dteReturnDate As Date Dim i As Integer dteReturnDate = datOne If intWorkDaysToAdd > 0 Then i = 1 Do While i < intWorkDaysToAdd + 1 dteReturnDate = dteReturnDate + 1 If WorksheetFunction.Weekday(dteReturnDate, 3) < 5 Then i = i + 1 End If        Loop Else i = -1 Do While i > intWorkDaysToAdd - 1 dteReturnDate = dteReturnDate - 1 If WorksheetFunction.Weekday(dteReturnDate, 3) < 5 Then i = i - 1 End If        Loop End If    ADDWORKINGDAYS = dteReturnDate End Function

Code Snippits