Add numbers between certain dates

C

Confused

I have dates in one colum and values in another colum. I want to add values
that are between Jan.1 to Jan. 31. How can I formulate this?
 
B

Bob Phillips

=SUMPRODUCT(--(MONTH(A2:A200)=1),B2:B200)

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

If there could be multiple years data then use

=SUMPRODUCT(--(YEAR(A2:A200)=2006),--(MONTH(A2:A200)=1),B2:B200)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Top