I've modified your file a bit, to take out merged cells (try to avoid them for various reasons I'm not going over here).
I've used this formula
=IF(MONTH(DATEVALUE(F4&" "&D4))<>MONTH(DATEVALUE(F4&" "&D4)-(WEEKDAY(DATEVALUE(F4&" "&D4))-1)+{0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1),"",DATEVALUE(F4&" "&D4)-(WEEKDAY(DATEVALUE(F4&" "&D4))-1)+{0;1;2;3;4;5}*7+{1,2,3,4,5,6,7}-1) as an array




Reply With Quote
Bookmarks