Isolating months
With your dates in A4:A368, and values in B4:B368, I got results for
question 1 with this formula:
=SUMPRODUCT(--(C1<=A4:A368),--(C2=A4:A368),B4:B368)
With a date in C3 formatted to show Month-Year, I got results for
question 2 with this formula:
=SUMPRODUCT(--(MONTH(C3)=MONTH(A4:A368)),B4:B368)
|