+ Reply to Thread
Results 1 to 4 of 4

Countif

Hybrid View

shaggylad Countif 06-08-2011, 07:45 AM
daddylonglegs Re: Countif 06-08-2011, 07:51 AM
Roger Govier Re: Countif 06-08-2011, 07:55 AM
Kyle123 Re: Countif 06-08-2011, 07:56 AM
  1. #1
    Registered User
    Join Date
    06-08-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1

    Countif

    Hi,

    I have a situation where I need to have a count of "Pass" in a certain coulmn say J, and the count should satisfy specific condition on another column E.

    E F
    A Pass
    B Pass
    C Fail
    A Fail
    A Pass

    I need the number of "Pass" from F if the column E has A, in this situation it should return 3. I used countif it returns someother value.

    Please help me on this

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,721

    Re: Countif

    Try COUNTIFS (with an "S"), i.e.

    =COUNTIFS(E:E,"A",F:F,"Pass")
    Audere est facere

  3. #3
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Countif

    Hi

    You need to use COUNTIFS not COUNTIF

    =COUNTIFS(F2:F6,"Pass",E2:E6,"A")

    By the way, then answer is 2, not 3
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Countif

    Hi

    I'm a bit confused, I would have thought that the answer you are looking for would be 2 as there are 2 "A"s that also have Pass, the other Pass has "B".

    If you want the result 2, the following would work, where the first range is the range of letters and the second is the range where the Pass/Fail is.

    This is an array formula so should be entered with Ctrl+Shift+Enter

    =SUM(IF(A1:A6="A",1,0)*IF(B1:B6="Pass",1,0))
    if you just want to check if the first column contains A and then count the number of passes then below would work

    =IF(COUNTIF(A1:A6,"A")>0,COUNTIF(B1:B6,"Pass"))
    Hope this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1