COUNTIFS with OR conditions

Copper Contributor

I am trying to count text values using the following formula.

 

=COUNTIFS(Roster!$C:$C, "Female", Roster!$D:$D,{"New Freshman","Other Transfer","SUNY/CUNY Transfer"},Roster!$F:$F, $B26, Roster!$G:$G,"LLDB")

 

I want the result to be the sum if a person is listed as a "New Freshman" or "Other Transfer" or "High School Transfer".  What I am getting though is just a count of New Freshman.  If I move High School Transfer first, my results is just the count of High School Transfer.

 

Any assistance with this formula would be appreciated.

 

Thanks in advance.

2 Replies
Try wrapping it with the sum function:

=SUM(COUNTIFS(Roster!$C:$C, "Female", Roster!$D:$D,{"New Freshman","Other Transfer","SUNY/CUNY Transfer"},Roster!$F:$F, $B26, Roster!$G:$G,"LLDB"))

@fishnejt 

As a comment, COUNTIFS returns an array of count for each value in the list of {"New Freshman","Other Transfer","SUNY/CUNY Transfer"} 

If you are on Excel which supports dynamic arrays, result will be visible as array. If not, Excel silently takes only first element from this array and shows it.

 

In both cases to receive all counts array shall be summed as @JMB17 suggested.