# Countif and array

Hello,
I’ve no idea, how to resolve it, I’ve tried many solutions but without success. Values are in two column and looks like bellow.

``````yes	full
yes	empty
no	empty
no	full
yes	half
no	empty
yes	full
no	half
``````

this formula works
=COUNTIF(A1:A30;“yes”;B1:B30;“full”)+COUNTIF(A1:A30;“yes”;B1:B30;“half”)
this doesn’t
=COUNTIF(A1:A30;“yes”;B1:B30;{“full”,“half”})

Maybe its simple, but I’ve had enought and I’m still in trouble how to count first column with many conditions from second one? It’s possible, or not?

{Slightly edited for better readability of the table by @Lupp}

Welcome!
It seems you have a typo - did you mean COUNTIFS() instead of COUNTIF()?

And why do you think that the formula with the array `{"full";"half"}` does not work? Because you see 2 instead of the expected 3? In fact, the formula will return two values 2 and 1 in two adjacent cells. To get the desired 3, simply sum them up:

`=SUM(COUNTIFS(A1:A30;"yes";B1:B30;{"full";"half"}))`

1 Like

It didn’t worked because I make mistake, your’re right, should be COUNTIFS, now it’s ok., thanks