Forum Discussion

excelisfunny's avatar
excelisfunny
Copper Contributor
Oct 07, 2021
Solved

What is wrong with this formula?

=COUNTIFS(AA2:AB2,">1",AC2:AF2,">0")

 

I'm getting the #VALUE! answer...

  • JoeUser2004's avatar
    JoeUser2004
    Oct 08, 2021

    excelisfunny  wrote: ``I suppose when you start a question off with "why doesn't this work" without explaining what I'm trying to do...``

     

    Yup.  GIGO!

     

    -----

    excelisfunny  wrote:  ``I need the total count of [...] those have to be over 1 to count, PLUS the total count of four other cells that have to be over 0 [....] If there is another way to do it I'm all ears.``

     

    For that purpose, your COUNTIF(...)+COUNTIF(...) expression is exactly how I would do it.

     

    But I would eschew the outer parentheses.  IOW, I would write =COUNTIF(...)+COUNTIF(...).

     

    I never said nor implied otherwise.  As you noted, I could not comment on it since I did not know your intent.

     

     

7 Replies

    • excelisfunny's avatar
      excelisfunny
      Copper Contributor

      I'm confused on why that matters... Detlef_Lewin 

      A workaround that I used that ended up working was:

      =(COUNTIF(AB2:AC2,">1") + COUNTIF(AD2:AH2,">0"))

      • Detlef_Lewin's avatar
        Detlef_Lewin
        Silver Contributor

        excelisfunny 


        I'm confused on why that matters...

         


        Because Microsoft says so:

        The Criteria_range argument must contain the same number of rows and columns as the Sum_range argument.

         

Resources