Forum Discussion

Reza Dashti's avatar
Reza Dashti
Copper Contributor
Sep 25, 2020
Solved

IF function

Hi

i use COUNTIF + AND functions to count the number of some courses.  i want to count course and status at the same time. i mean count the number of LANUGUAGE when STATUS is yes. for example there are there rows where COURSE=LANGUAGE and STATUS=YES, but my formula in cell j2 returns zero. how can i solve the problem? an image is also attached.

luck

  • Reza Dashti That could be:

    =SUMPRODUCT(--(C2:C5="language")*--(F2:F5="yes"))

    or

    =COUNTA(FILTER(C2:C5,(C2:C5="language")*(F2:F5="yes")))

     in case you are a MS365 subscriber.

7 Replies

    • Reza Dashti's avatar
      Reza Dashti
      Copper Contributor

      Hi Sergei

      thanks for your help, but it still does not work with COUNTIFS function. i have attached an image. if you look at cell J2 it still returns zero.

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Reza Dashti 

        In your sample in column D you have no one word "language", thus formula correctly returns zero. If you'd like to calculate on column C, when it returns another.

         

        You may use formula suggested by Riny_van_Eekelen , or COUNTIFS

Resources