Ok, follow these steps *exactly* ...
Select the cells in the range - Select cell D15 first then drag down to D24.
Cell D15 needs to be the active cell. The active cell is the one that is not
shaded. All the other cells in the selected range will be shaded.
Goto Home tab>Styles>Conditional Formatting>Manage rules>New rule>Use a
formula to determine which cells to format
Enter this formula in the box below:
=MONTH(D15)=MONTH(B$2)
Click the Format button
Select the desired style(s)
OK out
If this doesn't work then your dates in D15

24 are not true Excel dates.
You can test that by trying this formula:
=COUNT(D15

24)
The result should be the count of dates in the range.