Sum by month in Excel and Google Sheets

=SUMIFS(B2:B5,A2:A5,">="&D5,A2:A5,"<="&EOMONTH(D5,0))

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.