Search code examples
excelexcel-formulacountifworksheet-functionlogical-or

COUNTIF combined with OR


I want a formula for count how many True/Yes/Si are in the range. If A1 is not empty i want to count. I don't know how to put the 3 parameters in the formula

=IF(A1="";"";COUNTIF(A2:A5;"TRUE")) <- I need to add Yes and Si.

Edit:

I forgot to say that I want or, not and. (I will never have "True", "Yes" and "Si" in the same range). I want something like that:

IF(A1="";"";COUNTIF(A2:A5;"True" or "Yes" or "Si"))

Solution

  • You could add multiple countif's - =if(A1<>"",countif(a2:a5,"Yes")+countif(a2:a5,"Si")+countif(a2:a5,"True"),"")