EXCEL FORMULAS CALCULATE WORKING HOURS BET TWO DATES WITH CRITERIA

I want calculate hours bet two dates with conditions i want result as two dimensions.
I have enclosed excel sheet please find the attachment

activity start date activity end date
4/5/2013 9:01 4/5/2013 23:00
4/6/2013 10:01 4/7/2013 23:10

if activity start time less than <10:00 am
if activity start time greater than >10:00 am

activity end date time should be completed same day 11:00 pm (23:00:00)
activity end date time should be completed next day before 11:00 pm(23:00:00)

if
one result wants calculation
if first criteria is met i want result calculate time between activity start and end time)
if secone criteria is met i want result calculate time from start time till next day 23:00:00 pm

another result want in true or fales
if first criteria is met i want result "yes activity completed same day"
if secone criteria is met i want result "yes activity completed second day"

AttachmentSize
ActivityDate.xls36.5 KB