Add numbers between certain dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
=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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top