A alphamax New Member Aug 16, 2015 #26 Code: =IF(AND((D$5-(D$5>D$6))<$B7,D$6>($A7-($A7>$B7))),MIN(D$6-(D$5>D$6),$B7)-MAX(D$5,$A7-($A7>$B7)),0)
Code: =IF(AND((D$5-(D$5>D$6))<$B7,D$6>($A7-($A7>$B7))),MIN(D$6-(D$5>D$6),$B7)-MAX(D$5,$A7-($A7>$B7)),0)