View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default sliding hours payment


Hi Leo,

I'm relatively new to this forum myself and can't give you much advice
about copying formulas from here, sorry.

I'm glad you got it working. That's the shortest formula I had but
SUMPRODUCT may not always be the quickest as you noticed - here's an
alternative

=IF((D1<$A3)*($A3<$B3)*($B3<D2);$B3-$A3;MIN(D2-D1;IF(($A3<D1)+(D1<$B3)+($B3<$A3)=2;$B3-D1+($B3<D1);0)+IF(($A3<D2)+(D2<$B3)+($B3<$A3)=2;D2-$A3+(D2<$A3);0)))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=509616