Bob,
AND Function used is not between WEEKDAY(C2,2)5 an
IF(WEEKDAY(C2,2)<6
But is between " WEEKDAY(C2,2)5 " and
IF(WEEKDAY(C2,2)<6,IF(AND(TM(C2)=Time!$A$5,TM(C2) <Time!$A$21),Time!$A$21,TM(C2)),IF(WEEKDAY(C2,2)<7 ,IF(TM(C2)=Time!$A$5,Time!$A$21,TM(C2)),Time!$A$2 1))=Time!$A$2
"
and TM is a Add-In function that works a
"TIME(HOUR()<MINUTE()<SECOND())"
This should help!!
--
Baap
-----------------------------------------------------------------------
Baapi's Profile:
http://www.excelforum.com/member.php...fo&userid=2733
View this thread:
http://www.excelforum.com/showthread.php?threadid=47793