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


OK, I think I've sorted it. Well it seems to work anyway. I don't know
whether I stumped you all, or it just wasn't clear enough. Or maybe the
problem wasn't interesting enough. Anyway, if anyone's interested,
here's what I came up with eventually. And my God is it a loooong one:

=IF(B15="","",IF(AND((B14<(LEFT(B14,5)+"22:00")),( B15<=(LEFT(B15,5)+"06:00"))),((B15-(LEFT(B14,5)+"22:00"))*24),IF(AND((B14=(LEFT(B14, 5)+"22:00")),
(B15<=(LEFT(B15,5)+"06:00"))),(B15-B14)*24,IF(AND((B14(LEFT(B14,5)+"22:00")),(B15=( LEFT(B15,5)+"06:00"))),(((LEFT(B15,5)+"06:00")-B14)*24),8))))




--
HappyTrucker
------------------------------------------------------------------------
HappyTrucker's Profile: http://www.excelforum.com/member.php...o&userid=25997
View this thread: http://www.excelforum.com/showthread...hreadid=393601