Using OR & AND in COUNTIFS

前端 未结 6 854
渐次进展
渐次进展 2021-01-04 02:27

I would like to include an \"AND\" condition for one of the conditions I have in my COUNTIFS clause.

Something like this:

=         


        
6条回答
  •  一生所求
    2021-01-04 02:54

    You could just add a few COUNTIF statements together:

    =COUNTIF(A1:A196,"yes")+COUNTIF(A1:A196,"no")+COUNTIF(J1:J196,"agree")
    

    This will give you the result you need.

    EDIT

    Sorry, misread the question. Nicholas is right that the above will double count. I wasn't thinking of the AND condition the right way. Here's an alternative that should give you the correct results, which you were pretty close to in the first place:

    =SUM(COUNTIFS(A1:A196,{"yes","no"},J1:J196,"agree"))
    

提交回复
热议问题