SUMIF Two Conditions

  • Thread starter Thread starter mjones
  • Start date Start date
M

mjones

Hi All,

This isn't working.

=IF(AND($B$5:$B$59>39721,$B$5:$B$59<39813),SUMIF($D$5:$D$59,$C69,$F
$5:$F$59))

entered with Ctrl-Shft-Enter.

I'm trying to the a total amount in the range F5 to F59 if the date in
B5 to B59 (corresponding the number in F5 to F59 is between 39721 and
39813 and the text in D5 to D59 matches C69.

Any help would be appreciated.

Thanks,

Michele
 
Try this:

=SUMPRODUCT(--(B5:B59>=39721),--(B5:B59<=39813),--(D5:D59=C69),F5:F59)

Basically, the first terms (with the "--") return a '1' if true and '0' if
false, so you end up adding the sum only if all the other terms are true.

If you have Excel 2007, there is a "=SUMIFS" function that can do much the
same thing.

hth
 

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