I believe that you do not enter the formula as an array formula. @Alexandru is right with his comment, which only calculates the first cell of the provided range, so you have YEAR(G2)=2013 , which is true, and you get the sum of the entire range of H6:H11 .
Some workarounds:
You enter an array into the formula. To do this, you need to press and hold Ctrl + Shift , and then press Enter .
Use a formula that automatically treats input as an array, for example SUMPRODUCT :
=SUMPRODUCT((YEAR(G6:G11)=2013)*H6:H11)
Change your logic for this amount and use SUMIFS , using the first and last dates of the year as boundaries:
=SUMIFS(H6:H11,G6:G11,">=01-Jan-2013",G6:G11,"<=31-Dec-2013")
Jerry source share