Here is the code for UDF of GetDate.
How to paste the code?
In Developer Tab click on Visual basic.
VB window opens.
Insert --> Module
Now copy and paste the code into VB window.
Close VB window.
GetData function is available in excel function list.
See the file.
Any clarifications welcome.
Function GetDate(Startdate As Long, WkngDays As Double, WkngHrs As Double, AppdHrs As Double)
Do While AppdHrs > 0
If Weekday(Startdate, 2) < (WkngDays + 1) Then
k = Weekday(Startdate, 2)
AppdHrs = AppdHrs - WkngHrs
If WkngDays = 5.5 And Weekday(Startdate, 2) = 6 Then
AppdHrs = AppdHrs + (WkngHrs / 2)
End If
End If
Startdate = Startdate + 1
Loop
GetDate = Startdate - 1
End Function
Bookmarks