View Single Post
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Issam,

I can't really follow your logic: why do you want to add 7 hours?

Perhaps an explanation of your expected results from various inputs.

Would 11:00 be 11:00 PM, perhaps?

HTH,
Bernie
MS Excel MVP


"Issam LAdki" wrote in message
...
Hi all

I have been trying to solve this formula for some time but with no

success.

Cell E7 contains Time for end of previous activity, e.g. 14:00
Cell F7 contains Time for start of next activity, e.g. 11:00


=IF(OR((ISTEXT(E7)),(ISBLANK(E7))),F7+TIME(7,0,0), (IF(F7<MOD(E7+TIME(12,0,0)
,1),"ERR",F7+TIME(7,0,0))))

This formula seems to work great if the end time (E7) is after 12:00, but

if
it is before 12:00, then I always get "ERR".

What I have been trying to do is to add
IF (F7 <12:00, F7=12:00 and proceed with the fromula, otherwise just

proceed
with it as shown.

Any suggestions please, and thank you