# MS Excel SUMIF with multiple criteria



## StagColumbus (Jan 5, 2008)

OK, final stretch with this project. I am trying to get a summary table that pulls from an excel worksheet to have two quantifiers (Date and Aircraft) to then add up the rows that have columns with those criteria.

Sorry, I cannot zip any files form these computers, so here is my best description of the worksheet. Column A is the Date; Column F is the aircraft type (in this case a T-37); column H is a deviation number (ususally 1). The range in this example goes from row 2 to row 11


ColumnA / ColumnF / ColumnH
Date / Type A/C / number


The following is a SUMIF that currently works great what I’m using to count T-37 deviations:

=SUMIF(DeviationLog!$F$2:$F$11,"=T-37",DeviationLog!H$2:H$11)


I need to further qualify the data by making sure the deviation is from today’s date?

I have used an AND statement in the past to create a true-false solution. Can I do a SUMIF that would incorporate something like the AND statement?
=IF(AND($A2=TODAY(),$F2="n"),1,0)

Would it become? =SUMIF(AND(DeviationLog!$A2:$H$11=TODAY(), DeviationLog!$F$2:$F$11,"=T-37"), DeviationLog!H$2:H$11)

Obviously the answer is, “no,” or I wouldn’t be asking.

Thanks,

This project is so close!!!!

Stag


----------



## Glaswegian (Sep 16, 2005)

Hi again

Easiest way is to use SUMPRODUCT.

You might need to tweak this to suit, but it worked for me

*=SUMPRODUCT((A2:A11=TODAY())*(F2:F11="T-37"),H2:H11)*

The first set of parenthesis contains your first criteria, the second set of parenthesis contains the second criteria, and the range at the end is the ranged to be summed.


----------

