View Single Post
  #3   Report Post  
Issam LAdki
 
Posts: n/a
Default

Bernie, thanks for your assistance.

The reason for adding 7 hours is because that is the length of the time for
the activity. Therefore the logic behind it is:
Start activity 1 today at 10.00 for example and it ends at 17.00 (cell e7).
The start of the nect activity should not be
before 07.00 (Cell F7) next day. All times are based on 24 hour day

thanks again

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
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