Forum Discussion

Vitor Leone's avatar
Vitor Leone
Copper Contributor
Jul 26, 2017

countifs more than 2 criteria

Hello,

 

I am trying to count the type of management type using the below table using the countifs function but everytime I use more than 2 criteria I got a 0 value.

I used the following =countifs(range,"=Trust", range,"=Adur",range="2009").

Meaning I want all Trust, when the borough is Adur in 2009.

Where am I going wrong? Does the countifs function cannot handle more than 2 criteria.

 

Any help will be very much appreciatted.

 

 

 

YearBoroughManagement Type
2009Adur                                              Trust
2009Adur                                              Trust
2009Adur                                              Trust
2009Allerdale                                         Education
2009Allerdale                                         Trust
2009Allerdale                                         Education
2009Allerdale                                         Education
2009Allerdale                                         In-House
2009Allerdale                                         Trust
2009Allerdale                                         Trust
2009Allerdale                                         In-House
2009Allerdale                                         Education
2010Adur                                              Trust
2010Adur                                              Trust
2010Adur                                              Trust
2010Adur                                              Education
2010Allerdale                                         Education
2010Allerdale                                         Trust
2010Allerdale                                         Education
2010Allerdale                                         Education
2010Allerdale                                         In-House
2010Allerdale                                         Trust
2010Allerdale                                         Trust
2010Allerdale                                         Education
2010Allerdale                                         Education
2010Alnwick                                           Trust
2011Adur                                              Trust
2011Adur                                              Trust
2011Adur                                              Trust
2011Adur                                              Education
2011Allerdale                                         Education
2011Allerdale                                         Trust
2011Allerdale                                         Education
2011Allerdale                                         Education
2011Allerdale                                         In-House
2011Allerdale                                         Trust
2011Allerdale                                         Trust
2011Allerdale                                         Education
2011Allerdale                                         Education
  • Logaraj Sekar's avatar
    Logaraj Sekar
    Steel Contributor

    Hi Vitor César,

     

    There is no problem. Select Correct range (either specified cells or entire column) and apply

     

     

    =COUNTIFS(C:C,"Trust",B:B,"Adur",A:A,"2009")

    I've taken your data as A,B,C Columns respectively.

     

  • Hi Vitor,

     

    As i remember COUNTIFS allows up to 256 criterias. In your latest condition use "=2009"

    • Vitor Leone's avatar
      Vitor Leone
      Copper Contributor

      Dear Sergei,

       

       

      Many thanks for your reply.

      Still does not work. Each criterion is coming from a different column so column A will be the year range, column B borough, and column C management type. When I type the function countifs

      the syntax I am using is:

      =countifs(column c range,"=Trust", column b range,="Adur", column a range, "=2009")

       

      And I get a zero value...

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        Hi Vitor,

         

        Please see file  attached. I used

        =COUNTIFS(C2:C40,"Trust*",B2:B40,"Adur*",A2:A40,"=2009")

        Trust*, Adur* since there are spaces at the end of strings, not sure that's in your file or they were added when i copy/pasted from screen. 

         

Resources