View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default Calculation completion date/time

"MPI Planner" wrote:
I am looking at added expected production hours to a start date/time and
excluding weekends, show a completion date/time

6-Mar 10:32 PM + 12.8 "hours" =?

If I add the time to the date normally I get March 7th @ 11:21 AM. This is a
Saturday however and I want to get something on Monday. I tried using the
Workday function but only got 6-Mar 0:00 which is incorrect.




Shane Devenshire wrote:
Hi,

Suppose your date and time are in A1 and the hours to be added are entered
as time in B1 then

=A1+B1+IF(MOD(A1+B1,7)<2,2-(MOD(A1+B1,7)<=1))



Fails with the stated example (I get 3/8/2009 11:20 AM). Actually, only seemed
to work for results on the same week as A1 or (almost all of) the following Tuesday.