• COUNTA function (2000)

    Author
    Topic
    #373141

    Problem: I have a row of cells (A1:AE1) that may or may not contain values. In each of the cells in row A2:AD2, I have the formula (using cell A1 as an example) “=If(A10,”Yes”,””). At cell AE2, I want to count the number of cells in row A2:AD2 that contain a “Yes”, but ignore the cells that contain nothing. When I use the COUNTA(A2:AD2) function in cell AE2, I get the number “31”, even though I may only have values in, say, cells A2, A3, A4 and A5 (and, therefore, the answer in cell AE2 should be “4”).
    Any help?
    Jeff

    Viewing 1 reply thread
    Author
    Replies
    • #598789

      Use

      =COUNTIF(A2:AD2,”=Yes”)

      instead.

      Glenn.

    • #598979

      The reason you were getting 31 is that the expresion “If(A10,” basically says “if A1 is lesss than, or equal to, or greater than 0”, in other words anything, and there are 31 columns from A to AE, inclusive.

      Hope this helps

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    Viewing 1 reply thread
    Reply To: COUNTA function (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: