SUMIF with Multiple Criteria

C

chickalina

=SUMIF(D3:D3001,"014",
G3:G5000)+SUMIF(I4:I10,"<"&DATE(2009,1,1),G4:G10)-SUMIF(I4:I10,"<"&DATE(2009,1,31),G4:G10)

what's wrong with this code? I'm looking to sum everything for building 14
(located in column D) from January 1 to January 31 (Located in column I).
Column G is where the monetary values are....

Thanks for any help!
M
 
S

Shane Devenshire

Hi,

Try something like this

=SUMPRODUCT(--(D3:D10="014"),--(I4:I10>=DATE(2009,1,1)),--(I4:I10<=DATE(2009,1,31)),G4:G10)

But note your logic is different from that which I am using above. For
example your first range D3:D3001 does not match your other criteria ranges.
Your formula misses Jan 31.
 
S

Shane Devenshire

Hi,

In 2007

=SUMIFS(G3:G10,D3:D10,"014",I3:I10,">="&DATE(2009,1,1),I3:I10,"<="&DATE(2009,1,31))

In my prevous post I failed to notice that you are running some ranges from
row 3 and others from row 4. All ranges must be of equal size for these
formulas, so you should correct my previous suggestion accordingly.
 

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