+ Reply to Thread
Results 1 to 5 of 5

cannot solve with countif function

  1. #1
    Forum Contributor
    Join Date
    03-16-2010
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    Excel 2003
    Posts
    216

    cannot solve with countif function

    Hi,

    I am trying to use countif function to count value in columnA1:A11 and the condition would be base on columnB1:B11=cellE1. I am trying with this =COUNTIF(A1:A11,B1:B11=E1).

    could you please advice if i am on the right way? i also would like to solve this with sumproduct, would it work?

    I have attached a worksheet along. Thanks you very much for your time and all the comments you may give me.
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: cannot solve with countif function

    The COUNTIF function only test its criteria on one range.
    Consequently, in your formula:
    Please Login or Register  to view this content.
    You could either test Col_A or Col_B, but not both.
    Since you appear to be interested in testing Col_B for the value of E1,
    try this formula:
    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    03-16-2010
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    Excel 2003
    Posts
    216

    Re: cannot solve with countif function

    Hi,

    Thanks you very much.

    Yes, it's working fine now. But what if i want to count only those group that already started their work?

    I have edited my attachment and add them along.

    Thanks you very much for your time.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: cannot solve with countif function

    Try this:
    {=SUMPRODUCT((B2:B12<>"")*(C2:C12=F2))}. To get the curly brakets, you will need to select the Control + Shift + Enter keys simoultaneously.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: cannot solve with countif function

    No need to CTRL+SHIFT+ENTER...The SUMPRODUCT function handles the situation nicely.

+ 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