Home » excel » Countif function in excel

Countif function in excel

Posted by: admin May 14, 2020 Leave a comment

Questions:
Company  No of days   Closed
A           20          Yes
D           61          Yes
B           60          Yes
C            1          No
D            1          No
A            1          Yes
D            1          No
C            1          Yes

Suppose i have data like above on Column A,B,C
I want to count the number “A” in Closed = ‘Yes’ & No of days>5

I have tried the following and i’m not getting anything.

=IF(A:A="A",(IF(C:C="Yes",COUNTIF(B:B,">5"))))
How to&Answers:

Assuming your table starts in Range("A1") you could try to use =COUNTIFS function:

=COUNTIFS(A2:A9,"A",B2:B9,">5",C2:C9,"Yes")

for the whole columns A:C:

=COUNTIFS(A:A,"A",B:B,">5",C:C,"Yes")