Sumif with multiple conditions

S

SteveC

We need to sum data in a spreadsheet where multiple conditions apply.

C2:C400 is quantity data
J2:J400 is received date
K2:K400 is due date.

We want to sum the data in column c if the received date for a given record
is in a given month (which will change every report cycle), and the due date
for a given record is in any month following the received date month.

I can write a separate formula for each condition but that doesn't
necessarily help. When I try to structure a sumif using multiple conditions,
I just end up with errors.

Any help in understanding how to do it will be appreciated.
 
M

Mike H

Try

Wher F1 is the month of the number your looking for ( 1 - 12)

=SUMPRODUCT((MONTH(D2:D400)=F1)*(MONTH(E2:E400)>MONTH(D2:D400))*(C2:C400))

Mike
 
B

Bernard Liengme

With report month in A1
=SUMPRODUCT(--(MONTH(J2:J400)=A1),--(K2:K400>DATE(YEAR(TODAY()),A1+1,0)),C2:C400
best wishes
 

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