Results 1 to 4 of 4

Thread: CountA(if

  1. #1
    Seeker srdavisgb's Avatar
    Join Date
    Jul 2018
    Posts
    5
    Articles
    0
    Excel Version
    Excel 2016

    CountA(if



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am trying to count numbers, both positive and negative (including zero) in a column based on criteria. Because the range of numbers, countif does not seem to be appropriate. I tried the following formula: =COUNTA(IF($A$2:$A$20=$D2,$B$2:$B$20)). Column A contains 3 "A's" with a number in column B. But, the formula result is 19.

    Any assistance you can provide with this challenge would be greatly appreciated.

    I have attached a file with the example data and formula.
    Attached Files Attached Files

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,938
    Articles
    0
    Excel Version
    O365
    Why not just use SUMIFS

    =SUMIFS($B$2:$B$20,$A$2:$A$20,D2)

  3. #3
    Seeker srdavisgb's Avatar
    Join Date
    Jul 2018
    Posts
    5
    Articles
    0
    Excel Version
    Excel 2016
    =SUMIFS($B$2:$B$20,$A$2:$A$20,D2) returns 25. I am not trying to sum the numbers only count them.

    The results I'm trying to get in the example would be 3-A's, 3-B's, 2-C's and 2-D's.



  4. #4
    Seeker jono's Avatar
    Join Date
    Dec 2015
    Posts
    17
    Articles
    0
    Excel Version
    2016
    So you want to count the occurances of A,B,C and D in column A, If they have a something beside them in column B, while skipping the blanks.

    try =COUNTIFS(A:A,D2,B:B,"<>"&"")

    Should give you
    Criteria No.
    A 3
    B 3
    C 2
    D 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •