Having got myself in front of a computer I see now that I forgot (a) that EOMONTH needs 2 arguments and (b) that EOMONTH won't work as MONTH does with arrays.
So, half tested:
=IF(EOMONTH(B5,0)<>EOMONTH(B4,0),SUMPRODUCT((MONTH($B$4:$B$33)=MONTH(B4))*(YEAR($B$4:$B$33)=YEAR(B4))*($C$4:$C$33)),"-")