OK. This is why you should always show expected results in your sample workbook!
Are you still using Excel 2013?
Try this:
=MAX(IF($A$3:$A$336>=E3,IF($A$3:$A$336<EDATE(E3,1),$B$3:$B$336)))
Array formulae are not entered in the same way as 'standard' formulae. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
Bookmarks