View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default formula for programing end dates

Function EndDate(StartDate As Date, Optional hours As Long = 72) As Date
EndDate = DateAdd("h", hours, StartDate)
Do While Weekday(EndDate, vbMonday) < 5
EndDate = EndDate + 1
Loop
End Function

"warren" wrote:

I'm looking for the formula to do the following: to project a date in the
future. this date can "only" be on a Friday, Saturday or Sunday. sample:
I'm off work Friday thru Sunday, I take a part time job that will last 72
days. what would the completion date be? I have been unable to figure the
formula. can anyone help?