'Count if only of the critieria

Suppose I wrote this count if formula:

=COUNTIFS($B$1:$NA$1,'ALL PP'!$B$1,B11:NA11,"N*",$B$3:$NA$3,"Mon")+COUNTIFS($B$1:$NA$1,'ALL PP'!$B$1,B11:NA11,"Sick",$B$3:$NA$3,"Mon")

Suppose one row split into 7 columns (Monday,Tuesday,Wednesday,Thursday, Friday, Saturday, Sunday) contains N, then it counts. Then the output would be one

Same goes with with "Sick" the output would be one.

But if "sick" and "goes" on same day it would count as 2. I don't want that. I want a formula that can count either 1 of them.



Solution 1:[1]

There is probably a more elegant way of doing it, but you could use an if statement:

=IF(COUNTIFS($B$1:$NA$1,'ALL PP'!$B$1,B11:NA11,"N*",$B$3:$NA$3,"Mon")+COUNTIFS($B$1:$NA$1,'ALL PP'!$B$1,B11:NA11,"Sick",$B$3:$NA$3,"Mon") >= 1, 1, 0)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jonsca