sum, lookup, and date range

G

Guest

I've looked through most of the messages posted but could not find a formula
to help me solve my problem. I want to be able to get the sum from a list of
data that contains multiple Item # and date ranges. For example, I want to
find the sum used for Item C for each month seperately.

Col A. Col B. Col C.
Item Dates Usage
A 1/2/05 5
C 2/11/05 10
D 2/22/05 2
B 3/5/05 8
C 4/18/05 6
C 4/20/05 3
B 5/1/05 9

So I want to use a formula that will allow me to get the total usage for
Item C in the month of April, which equals 9.

Does anyone have a suggestion that may be able to help me? Thank you.
 
P

Peo Sjoblom

=SUMPRODUCT(--(A2:A50="C"),--(MONTH(B2:B50)=4),C2:C50)

note that if you use January you need to add


=SUMPRODUCT(--(A2:A50="C"),,--(B2:B50<>""),--(MONTH(B2:B50)=4),C2:C50)


since January index number (1) will return TRUE for blank cells
 

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

Top