Could you achieve this with just a formula in D1?
=if(EOMONTH(C1,0)<=E1,EOMONTH(C1,0),"ENTER DATE HERE")
--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile:
http://www.excelforum.com/member.php...o&userid=30486
View this thread:
http://www.excelforum.com/showthread...hreadid=523967