Google Sheets – CountIF with Multiple Conditions

google sheets

I have a spreadsheet that is essentially a todo list for different groups. I have a column for Group and Status. Both have data validation drop downs so I can reliably match the text content.

I have a stats area at the top. I have easily been able to use a simple COUNTIF to count up the total incomplete tasks:

=COUNTIF(Status, "New") + COUNTIF(Status, "In Progress")

I would like to have a similar count, but it should be specific to the group. "Count all rows that have the value, "Group 1" in the named range, Group, and have the value "New" or "In Progress" in the named range, Status.

Here it is in c-ish pseduocode:

n = 0;
if ((Status == "New") OR (Status == "In Progress")) AND (Group == "Group 1")
{
   n++;
}
return n;

Is this possible?

Best Answer

Here is the solution that ended up working for me:

=ArrayFormula(sum(countif(if(Group="Group 1",Status),{"New","In Progress"})))